[Haskell-cafe] Just for a laugh...
droundy at darcs.net
Fri Jun 1 14:42:42 EDT 2007
On Fri, Jun 01, 2007 at 07:39:32PM +0100, Andrew Coppin wrote:
> David Roundy wrote:
> >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.
> No, I mean... how could you use unsafePerformIO to perform a typecast? I
> don't see a way to do that.
Then I'm confused. What typecast are you talking about?
Department of Physics
Oregon State University
More information about the Haskell-Cafe