[Yhc] coreFunc has extra argument

Tom Shackell shackell at cs.york.ac.uk
Tue Mar 4 11:22:02 EST 2008


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


More information about the Yhc mailing list