Is there a way to place some impure code inside pure functions?

unsafePerformIO :: IO a -> a in System.IO.Unsafe (base).

Use it with caution and read the description in the documentation carefully.

Leave a Comment