Changes between Version 7 and Version 8 of ExtensibleRecords


Ignore:
Timestamp:
Nov 12, 2007 12:16:00 AM (7 years ago)
Author:
guest
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ExtensibleRecords

    v7 v8  
    1313 * [http://homepages.cwi.nl/~ralf/HList/ Heterogeneous Collections], see also [http://okmij.org/ftp/Haskell/keyword-arguments.lhs Keyword Arguments] 
    1414 * [http://hackage.haskell.org/trac/haskell-prime/attachment/ticket/92/Data.Record.hs Poor Man's Records] 
     15 
     16 
     17= Syntax = 
     18 
     19Purely for the sake of argument on this page, I propose the following syntax. Feel free to change or extend this if you can think of something better. Many of these conflict with existing Haskell operators, so can't be used in any concrete proposal. 
     20 
     21 * `{L1 = v1, L2 = v2, ...}` the constant record with field labels `L1, L2, ...` and corresponding values `v1, v2, ...` 
     22 * `{L1 :: t1, L2 :: t2, ...}` the type of the constant record with field labels `L1, L2, ...` and corresponding values of types `t1, t2, ...` 
     23 * `r . L` the value of the field labelled `L` in record `r` 
     24 * `t ::. L` the type of the field labelled `L` in record type `t` 
     25 * `r - L` the record `r` with field `L` deleted 
     26 * `t ::- L` the record type `t` with field `L` deleted 
     27 * `r + s` record `r` extended by adding all the fields of `s`. Many systems restrict to the case where `s` is constant. 
     28 * `t ::+ u` record type `t` extended by adding all the fields of type `u`. Many systems restrict to the case where `u` is constant. 
     29 
     30