Changes between Version 19 and Version 20 of Records/DeclaredOverloadedRecordFields


Ignore:
Timestamp:
Mar 3, 2012 10:11:49 AM (2 years ago)
Author:
AntC
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Records/DeclaredOverloadedRecordFields

    v19 v20  
    6969'''Option Three: Mixed In-situ and Declared ORF:''' 
    7070 
    71     [Added 3-March in response to concerns at the extra effort for a `fieldLabel` for all fields, not just the shared ones.] 
    72  
    73 Support 'flagging' in the record declaration whether field names are intended to be shared. Possible syntax: 
     71    [Added 3-March in response to concerns at the extra effort needed to declare a `fieldLabel` for every field, not just the shared ones.] 
     72 
     73Provide a way of 'flagging' in the record declaration whether field names are intended to be shared. Possible syntax: 
    7474{{{ 
    7575    data Cust_AdHoc = CustAH{ customer_id :: Int, x, y :: String } sharing (customer_id) deriving (...) 
    7676}}} 
    77  * Fields listed as sharing must have the `fieldLabel` (per Option One or Two). 
    78  * Fields not sharing will get a fieldLabel declared for them,[[BR]] and it will be monomorphic (bound to a single record type). 
     77 * Fields listed as `sharing` must have the `fieldLabel` declared separately (per Option One or Two). 
     78 * Fields not `sharing` will get a fieldLabel declared for them,[[BR]] and it will be monomorphic (bound to a single record type). 
     79 
     80Or perhaps: 
     81{{{ 
     82    data Customer_Order = Cust_Order { customer_id :: Int, order_num :: Int, ... } 
     83                          sharing (customer_id) share (order_num) deriving (...) 
     84}}} 
     85That is: 
     86 * for `share` fields, this is declaring them as sharable. 
    7987 
    8088    [End of 3-March addition.]