Changes between Version 25 and Version 26 of Records/DeclaredOverloadedRecordFields


Ignore:
Timestamp:
Mar 8, 2012 8:30:21 AM (2 years ago)
Author:
AntC
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Records/DeclaredOverloadedRecordFields

    v25 v26  
    2929    data Customer = Cust{ customer_id :: Int, ... }                     -- declaration syntax same as H98 
    3030    instance (t ~ Int) => Has Customer Proxy_customer_id t        where -- Has instance generated, with ~ constraint 
    31         get Cust{ customer_id } _ = customer_id                         -- DisambiguateRecordFields style 
     31        get Cust{ customer_id } _ = customer_id                         -- DisambiguateRecordFields pattern 
    3232        set _ x Cust{ .. }        = Cust{ customer_id = x, .. }         -- RecordWildCards and NamedFieldPuns 
    3333