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
_______________________________________________
Yhc mailing list
Yhc@haskell.org
http://www.haskell.org/mailman/listinfo/yhc

Reply via email to