[Haskell-cafe] Issues(Bugs?) with GHC Type Families

Hugo Pacheco hpacheco at gmail.com
Wed Mar 5 20:27:47 EST 2008


Just something I have been wondering.

I would like to implement somehting like:

type family F a :: * -> *
...
class C a b where ...
instance (F a ~ F b) => C a b where ...

But apparently type equality coercions can not be used as a single context.
If I enable -fallow-undecidable-instances, whenever the equality does not
hold, the instance returns a compile error, what does make sense.

Is there any way I could overcome this?

Thanks,
hugo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080306/48876081/attachment.htm


More information about the Haskell-Cafe mailing list