[Haskell] class functional depency inference?

Hugo Pacheco hpacheco at gmail.com
Sat Jun 16 10:48:49 EDT 2007


Hi, I have resumed my problem to the following.

In this small example, the type checker always complains, and do need to
write something similar that would use the functional dependency to infere
the type b.

class SomeClass a b | a -> b

instance SomeClass Int Bool

test :: SomeClass a b => a -> b
test 1 = True

Cheers,
hugo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell/attachments/20070616/15b5ca5d/attachment.htm


More information about the Haskell mailing list