Using unsafePerformIO safely?

Well, discussing alternative approaches to I/O (or dealing with state) is probably best left to a new thread…are there any volunteers?