ERROR - Constraints are not consistent with functional dependency
*** Constraint : SetTrex (x :: Char, y :: a) (y :: b, x :: Char, y :: b, x :: Char) a b
*** And constraint : SetTrex (y :: a, x :: Char) (y :: b, x :: a) a b
*** For class : SetTrex a b c d
*** Break dependency : d a -> b
(If I give an explicit signature for the result, the error goes away.)
* the complaint is about **constraints** not consistent
so Hugs is generating constraints from the input expression
and comparing to the constraint arising from the method's type
* the reversal in order of appearance of labels in the records.
* but chiefly, the weird doubling-up of the record fields in the first Constraint.
If I try to update `y` in a record with 3 labels `x`, `y`, `z`, I get the same error, with even more puzzling details.
( The type vars used in the 'For class .../dependency ...' are distinct from the type vars in the constraints. That's usual Hugs perplexity.)