
4 Mar
2008
4 Mar
'08
11:22 a.m.
Neil Mitchell wrote:
You don't even need unsafePerformIO! All you need is a proxy a which has the right type, this can be done by doing:
showsType io = showString "(IO " . showsType a . showChar ')' where a = undefined b = asTypeOf (return a) io
That works too, though it still relies on showsType not evaluating it's argument - since otherwise it'll eval undefined :S Tom