To answer you directly, I've read code in various Haskell packages, everything from mime to snap, and AFAICT, it is typically used when you need to call a C library. Suppose you need to use OpenSSL's digest algorithms, for example. Because we technically don't know whether or not that library will have effects, we have to use unsafePerformIO.