[Haskell-cafe] coerce (safe!)

Krzysztof Skrzętnicki gtener at gmail.com
Sat Mar 1 19:21:42 EST 2008

Well, it is simply

> coerce :: a -> b
> coerce _ = undefined

so coerce is simply empty function. But still, it is possible to write a
function of type (a->b).
Well, possibly I didn't write anything particularly new, but please excuse
me for I'm still in
sort of a shock after I've discovered it.

Yet this function reminds me how little I know so I have a question for you.

I didn't took any lectures in Category Theory (for I'm still just a student,
and I won't for there are none in my institute),
but are there any good (e)books you would recommend for a (future) computer


Christopher Skrzętnicki
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080302/2c68a5b8/attachment.htm

More information about the Haskell-Cafe mailing list