Wouter Swierstra wrote:
            Test.IOSpec    Version 1.0
Shouldn't that be 0.1?

  * Test.IOSpec.Teletype: a specification of getChar and putChar.

You use Dynamic for the data type in IORefs, this has the unfortunate consequence of needing Typeable constraints. You could try to use unsafeCoerce instead,
> type Data = ()
> unsafeToData :: a -> Data
> unsafeToData = unsafeCoerce
> unsafeFromData :: Data -> a
> unsafeFromData = unsafeCoerce

I think this should be just as safe as Dynamic, since internally Dynamic uses unsafeCoerce as well. Just steal the details from there.

Twan
_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to