Changes between Version 23 and Version 24 of Records/NameSpacing


Ignore:
Timestamp:
Jan 11, 2012 2:03:42 AM (4 years ago)
Author:
GregWeber
Comment:

compatibility

Legend:

Unmodified
Added
Removed
Modified
  • Records/NameSpacing

    v23 v24  
    116116The function update syntax is a new addition to Haskell that we do not need to immediately implement.
    117117
    118 === Alternative approach: using tuple selectors ===
     118=== Alternative update syntax: using tuple selectors ===
    119119
    120120{{{
     
    160160== Compatibility with existing records ==
    161161
    162 The new record system can be enabled with `-XNAMESPACEDATA`
    163 
    164 Seems like it should be OK to use old records in the new system playing by the new rules, although those records likely already include some type of prefixing and would be quite verbose.
    165 There is a chance for deeper though on this issue.
     162The new record system is enabled with `-XNAMESPACEDATA`.
     163
     164* Should new modules be infectious? That is, if I turn the extension on for my module and export a record, does a user that wants to import the record also have to use the extension?
     165
     166* Records from modules without this extension can be imported into a module using it.
     167Ideally the old record fields would now only be accessed through a namespace. Also, we would ideally be able to strip any now useless field prefixes.
     168
     169{{{
     170module OldModule ( Record(..) ) where data Prefix = Prefix { prefixA :: String }
     171
     172module NewModule where
     173import OldModule ( Prefix(..) strip prefix )
     174
     175aFunc = let r = Prefix "A" in r.a
     176}}}
    166177
    167178