Hugo Pacheco:
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?
I think I don't understand your question fully. This class instance
requires both -XFlexibleInstances and -fallow-undecidable-instances to
compile.
If the equality does not hold, you should get a type error because
your program is not type correct. So, what is it that you would like
different?
Manuel
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe