[Haskell-cafe] FunDeps conflict

Joel Björnson joel.bjornson at gmail.com
Tue Jun 6 08:20:40 EDT 2006

Brian Hulley wrote :
> Possibly you meant to write:
>  instance IsFoo a => Class2 a a
>  instance Class2 (Bar a) a

Yes, in principle that illustrates the idea.
However I don't see the major difference from constraining the
'a' to the IsFoo class, as in

instance IsFoo a => Class2 (Bar a) a

This wont automatically imply 'Bar a' to instantiate IsFoo.

As pointed out, the problem arises due to the fact that it is possible
to write an instance for Bar a, which would then violate the  FunDep

So, since the compiler does not control this, I'll better remove the FunDep.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org//pipermail/haskell-cafe/attachments/20060606/eb424d9f/attachment.htm

More information about the Haskell-Cafe mailing list