> > ... decls that aren't allowed if I try to put them explicitly. > They're rejected as overlapping, and in no substitution ordering. >
Ah, I see this limitation is acknowledged in SPJ&MPJ 1999 'Lightweight Extensible Records for Haskell' proposal. https://www.microsoft.com/en-us/research/wp-content/uploads/1999/01/recpro.pdf Section 5.3 Instances: > instance D {r|x::a} where ... -- INSTANCES > instance D {r|y::b} where ... -- OVERLAP! (Note under that proposal the `r` representing the 'tail' of the record is prefixed.) For the record, I amended Hugs/Trex such that those instances do not overlap, provided each instance head mentions only a single label, and the labels are distinct. (Or depending on your point of view: they do overlap, but in a strictly-more-specific ordering given by the canonical ordering of labels.)
_______________________________________________ Hugs-Bugs mailing list [email protected] http://mail.haskell.org/cgi-bin/mailman/listinfo/hugs-bugs
