Changes between Version 71 and Version 72 of Records


Ignore:
Timestamp:
Mar 2, 2014 2:07:10 PM (15 months ago)
Author:
adamgundry
Comment:

Reference OverloadedRecordFields as eventually implemented

Legend:

Unmodified
Added
Removed
Modified
  • Records

    v71 v72  
    1010This page focuses exclusively on the first, narrow issue of disambiguating record field names.  We have a separate Wiki page, [wiki:ExtensibleRecords], on the broad issue of first class record types. 
    1111 
    12 On this page I'd like to summarise the problem, and specify alternative designs.  So far it is mostly a skeleton: please fill it out.  The idea is to hold a discussion by email (ghc-users?) but to collect results (alternative designs, trade-offs, pros and cons) here, because email threads quickly get lost.  Simon PJ. 
     12'''This page summarises the problem, and discusses alternative designs. The extension that was eventually implemented, [wiki:Records/OverloadedRecordFields OverloadedRecordFields], is described on its own page.''' 
    1313 
    1414== The problem: record name spacing == 
     
    4747 * '''Plan B''': Types.  This uses types to disambiguate record field names. 
    4848 
    49  1. '''[wiki:Records/OverloadedRecordFields Simple Overloaded Record Fields] (SORF)'''.  Pure (Plan B). 
     49 1. '''[wiki:Records/OverloadedRecordFields/SORF Simple Overloaded Record Fields] (SORF)'''.  Pure (Plan B). 
    5050 2. '''[http://hackage.haskell.org/trac/haskell-prime/wiki/TypeDirectedNameResolution Type Directed Name Resolution] (TDNR)'''.  Pure (Plan B), but without abstraction over fields of the same name. 
    5151 3. '''[wiki:Records/NameSpacing Agda-derived Records] (ADR)''' Pure (Plan A). Explained on below FDR page. 
     
    5858 10. '''polymorphic extensible records with scoped labels''' by Daan Leijen, [http://elm-lang.org/blog/announce/version-0.7.elm (implemented in Elm)] and in the DSL [http://www.cs.indiana.edu/~rrnewton/wavescope/WaveScope_+_WaveScript/ WaveScript] 
    5959 11. '''Are there any other approaches?''' 
     60 
     61The [wiki:Records/OverloadedRecordFields OverloadedRecordFields] extension eventually implemented was based on SORF, but with some modifications based on feedback. Of course, this may not be the end of the story... 
    6062 
    6163=== Similarities ===