[Haskell-cafe] Re: Top Level TWI's again was Re: [Haskell] Re: Parameterized Show

Benjamin Franksen benjamin.franksen at bessy.de
Mon Nov 22 17:36:50 EST 2004

On Monday 22 November 2004 23:22, Keean Schupke wrote:
> It seems to me that as unsafePerformIO is not in the standard and only
> implemented on some
> compilers/interpreters, that you limit the portability of code by using
> it, and that it is best avoided. Also as any safe use of unsafePerformIO
> can be refactored to not use it I could
> certainly live without it.

With one exception: If a foreign function (e.g. from a C library) is really 
pure, then I see no way to tell that to the compiler other than using 
unsafePerformIO. IIRC, unsafePerformIO is in the standard FFI libraries.

Top level things with identity are evil.	-- Lennart Augustsson

More information about the Haskell-Cafe mailing list