Dear Haskellers,<div><br></div><div>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.</div>


<div><br></div><div>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</div>


<div><br></div><div>class (A a, B a) =&gt; C a where {}</div><div><br></div><div>but as from <a href="http://hackage.haskell.org/trac/ghc/ticket/2715" target="_blank">http://hackage.haskell.org/trac/ghc/ticket/2715</a>, equality constraints are currently not supported in class contexts, what might be reasonable.</div>


<div>However, in fact I am just looking for some kind syntactic sugar. Would this be a desired feature for other people?</div><div><div><br></div><div>Regards,</div><div>hugo<br clear="all"><br>-- <br><a href="http://www.di.uminho.pt/~hpacheco" target="_blank">www.di.uminho.pt/~hpacheco</a><br>



</div></div>