<div dir="ltr">><br><div>> ... <span style="color:rgb(0,0,0);white-space:pre-wrap">decls that aren't allowed if I try to put </span><span style="color:rgb(0,0,0);white-space:pre-wrap">them explicitly.</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">> They're rejected as overlapping, and in no </span><span style="color:rgb(0,0,0);white-space:pre-wrap">substitution ordering.</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">Ah, I see this limitation is acknowledged in SPJ&MPJ 1999 '</span>Lightweight Extensible Records for Haskell' proposal.</div><div><a href="https://www.microsoft.com/en-us/research/wp-content/uploads/1999/01/recpro.pdf">https://www.microsoft.com/en-us/research/wp-content/uploads/1999/01/recpro.pdf</a><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">Section 5.3 Instances:</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">> </span>instance D {r|x::a} where ... -- INSTANCES</div>> instance D {r|y::b} where ... -- OVERLAP!<div><br></div><div>(Note under that proposal the `r` representing the 'tail' of the record is prefixed.)</div><div><br></div><div>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.)</div><div><br></div><div><br></div></div>