Suggestion for module system (to get rid of many uses of unsafePerformIO)

oleg at oleg at
Thu May 24 03:39:07 EDT 2007

Stephen Dolan wrote:
> unsafePerformIO is possibly the most ugly feature of Haskell, yet is
> necessary to do many things which should be possible without it, such
> as reading configuration from a file at startup or creating global
> IORefs

There is a considerable debate about global mutable state even in
imperative languages. As to reading data from a configuration file --
which should be immutable for the rest of the computation -- one
solution has been proposed back in 2002:

	Pure File Reading (was: Dealing with configuration data)

The problem essentially is of separate compilation and dynamic linking --
both of which are far simpler now than it was in 2002, with GHC API and

More information about the Haskell-prime mailing list