Christopher Lane Hinson wrote:
On Fri, 16 Jul 2010, Paul L wrote:

Does anybody know why the type families only supports equality test
like a ~ b, but not its negation?

I would suggest that type equality is actually used for type inference,
whereas proof of type inequality would have no consequence (that I can think of) for the compiler.

Also, it's a lot easier to solve a system of constraints when you only have positive constraints. Adding negative constraints greatly complicates the solver. In many cases it's still doable, though the structure of types might pose some additional challenges above the usual ones.

(And they're usually called "disequality" constraints, since inequalities are only interesting when you have subtyping.)

--
Live well,
~wren
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to