Changes between Version 59 and Version 60 of Records/OverloadedRecordFields/Implementation


Ignore:
Timestamp:
Sep 2, 2013 1:58:18 PM (20 months ago)
Author:
adamgundry
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Records/OverloadedRecordFields/Implementation

    v59 v60  
    216216Thus we use the name of the representation tycon, rather than the family tycon, when naming the record selectors: we get `$sel_foo_R:FInt` and `$sel_foo_R:FBool`. This requires a bit of care, because lexically (in the `GlobalRdrEnv`) the selectors still have the family tycon are their parent. 
    217217 
    218 In order to have access to the representation tycon name in the renamer, when the record selector names are generated, it is generated by `getLocalNonValBinders` and stored in a new field `dfid_rep_tycon` of `DataFamInstDecl`.  
     218In order to have access to the representation tycon name in the renamer, it is generated by `getLocalNonValBinders` and stored in a new field `dfid_rep_tycon` of `DataFamInstDecl`. It would be nice if we could do the same for all the derived names, in order to localise the set of names that have been used (currently stored in the `tcg_dfun_n` mutable field). However, this is tricky: 
     219* Default associated type declarations result in axioms being generated during typechecking. 
     220* DFun names for instances of `Typeable` and the `Generics` classes are generated during typechecking. 
     221We could work around this but it may not be worth the bother. 
    219222 
    220223