[Haskell-cafe] Just for a laugh...
droundy at darcs.net
Fri Jun 1 14:36:46 EDT 2007
On Fri, Jun 01, 2007 at 07:28:07PM +0100, Andrew Coppin wrote:
> David Roundy wrote:
> >Note also that you can use unsafePerformIO to safely get pure functions
> >doing both these operations.
> I've always been puzzled by this one... how does unsafePerformIO
> circumvent the type system? I don't understand.
It's a primitive. You couldn't implement it unless you're the
compiler-writer. But it's a necesary primitive, if you wish to build
efficient data types. You just need to carefully audit everywhere that
unsafePerformIO is used.
Department of Physics
Oregon State University
More information about the Haskell-Cafe