[Haskell-cafe] Being impure within a 'pure' function

Jason Dusek jason.dusek at gmail.com
Wed Apr 22 05:14:49 EDT 2009


  If you want to do raw IO and repackage it as "pure", you can
  use `unsafePerformIO` and friends. It is important to use the
  `NOINLINE` pragma in that case.

--
Jason Dusek


 |...unsafePerformIO...|
  http://haskell.org/ghc/docs/latest/html/libraries/base/System-IO-Unsafe.html#v%3AunsafePerformIO


More information about the Haskell-Cafe mailing list