id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
2104,Add Labels,barney,,"This is an alternative to #1894 to support the implementation of ExtensibleRecords. This version is more complex, but both more orthogonal to the rest of the language, and supports better record features.

1. Add a new syntactic class[[BR]]
    label -> ( {{{'}}} (small | large | digit) {small | large | digit | {{{'}}} }),,<char>,,

A label {{{'name}}} is interpreted as a conid at the value level, and as a tycon at the type level, with an implicit declaration:
{{{
data 'name = 'name
}}}
but with global scope, so the same label in different modules is the same value/type.

2. Add a built-in one-parameter type class {{{Label}}} with no methods, and for each label {{{'name}}} an implicit instance
{{{
instance Label 'name where
}}}
No other instances of {{{Label}}} are allowed.

3. Add a built-in type synonym family {{{LabelCMP}}} of kind {{{* -> * -> *}}}. For every pair of labels {{{'name1}}} and {{{'name2}}}, one of the instances
{{{
    LabelCMP 'name1 'name2 = LabelLT
    LabelCMP 'name1 'name2 = LabelEQ
    LabelCMP 'name1 'name2 = LabelGT
}}}
is implicitly defined, depending on the lexicographic order of {{{'name1}}} and {{{'name2}}}. No other instances of {{{LabelCMP}}} are allowed. (The types {{{LabelLT}}}, {{{LabelEQ}}} and {{{LabelGT}}} are datatypes with no constructors, which can be declared in a library.)
",feature request,new,lowest,7.6.2,Compiler,6.8.2,,,,Unknown/Multiple,Unknown/Multiple,,Unknown,,,,
