Changes between Version 8 and Version 9 of EmptyDataDecls


Ignore:
Timestamp:
Jul 29, 2009 6:30:07 PM (6 years ago)
Author:
sweirich
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • EmptyDataDecls

    v8 v9  
    7575syntactically. But the point is that there is a choice.
    7676
     77For this extension, probably the best course of action is to follow GHC and allow `deriving ()` clauses
     78for empty data declarations. That way no deriving clause and `deriving ()` still have the same semantics. To
     79do this, we syntactically allow all deriving clauses for empty data, but semantically limit the clauses to `deriving ()`.
     80
    7781
    7882== References ==
     
    8084
    8185== Report Delta ==
    82 
    83 The changes to the report necessary to implement the proposal.  Required for a proposal to move to the "accepted" state.
    8486
    8587Replace the syntax in [http://www.haskell.org/onlinereport/decls.html] '''4 Declarations and Bindings''':
     
    130132</div>
    131133}}}
     134
     135Also, in the description of when derived instances are possible for a class C [http://www.haskell.org/onlinereport/derived.html#derived-appendix], add the following condition.
     136{{{
     137#!html
     138<div style="background: #dfd; border-color: #c00; border-style: solid; border-width: 1px">
     139}}}
     140   6. If the data declaration has no constructors (i.e. when n=0), then no classes are derivable (i.e. m=0).
     141{{{
     142#!html
     143</div>
     144}}}