[Yhc] coreFunc has extra argument

Neil Mitchell ndmitchell at gmail.com
Tue Mar 4 11:26:14 EST 2008


Hi

>  > 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

Of course, but the advantage is that if it fails to work the side
effect is _|_, rather than (potentially) rooting your computer. I'm
thinking for the day when we have yhi --safe to not run IO
computations.

i.e. showType (deleteFile "/usr/shackell/thesis.tex")

:-)

Thanks

Neil


More information about the Yhc mailing list