Dear Haskellers,
When programming with type functions, I often find myself with a set of
invariants that are frequent in my programs and can be expressed as equality
constraints on the context of the functions.
I wonder if there is any way in current GHC to express some kind of synonyms
for equality constraints, to avoid a fixed set of constraints for a smaller
expression. The natural way for type classes would be to create a superclass
containing all the desired instances
class (A a, B a) => C a where {}
but as from http://hackage.haskell.org/trac/ghc/ticket/2715, equality
constraints are currently not supported in class contexts, what might be
reasonable.
However, in fact I am just looking for some kind syntactic sugar. Would this
be a desired feature for other people?
Regards,
hugo
--
www.di.uminho.pt/~hpacheco
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe