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
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to