On Thu, Mar 27, 2014 at 11:28 AM, ke dou <kd6ck@virginia.edu> wrote:
    class Conversion a where
        conversion :: a  -> b

b is completely unspecified here, since it's not defined as part of the typeclass. The literal meaning of this is that "the caller can request any type it pleases, and you have no way of knowing what it is". So the only possible result of `conversion` is bottom (e.g. `undefined`).

This is key: it does NOT mean that `conversion` gets to specify the result type! You can't do that, except by specifying the type in the type signature.

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net