Changes between Version 2 and Version 3 of Records/OverloadedRecordFields/Design


Ignore:
Timestamp:
Apr 22, 2014 9:50:44 AM (11 months ago)
Author:
simonpj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Records/OverloadedRecordFields/Design

    v2 v3  
    8989   * The record field selector function `x` is in scope.  
    9090 
     91 * This approach (in which the availability of magical instances depends on what is in scope) is similar to the special treatment of `Coercible` instances (see [http://research.microsoft.com/en-us/um/people/simonpj/papers/ext-f/ Safe Coercions]). 
     92 
    9193Notice that 
    9294 * The data type `T` might be defined locally in `M`, or imported. 
    9395 * If `T` is imported it does not matter whether `-XOverloadedRecordFields` is enabled in the module where `T` was defined. 
    9496 
    95 All this is very like the special treatment of `Coercible` instances (see [http://research.microsoft.com/en-us/um/people/simonpj/papers/ext-f/ Safe Coercions]). 
    96  
    97 This enables representation hiding: just like at present, exporting the field selector permits access to the field. For example, consider the following module: 
     97This design supports representation hiding: just like at present, exporting the field selector permits access to the field. For example, consider the following module: 
    9898 
    9999{{{