... | ... | @@ -132,16 +132,18 @@ gives a more regular syntax and better error messages than ruling out deriving f |
|
|
syntactically. But the point is that there is a choice.
|
|
|
|
|
|
|
|
|
## References
|
|
|
|
|
|
For this extension, probably the best course of action is to follow GHC and allow `deriving ()` clauses
|
|
|
for empty data declarations. That way no deriving clause and `deriving ()` still have the same semantics. To
|
|
|
do this, we syntactically allow all deriving clauses for empty data, but semantically limit the clauses to `deriving ()`.
|
|
|
|
|
|
- [ http://www.haskell.org/ghc/docs/latest/html/users_guide/data-type-extensions.html\#nullary-types](http://www.haskell.org/ghc/docs/latest/html/users_guide/data-type-extensions.html#nullary-types) GHC documentation.
|
|
|
|
|
|
## Report Delta
|
|
|
## References
|
|
|
|
|
|
|
|
|
- [ http://www.haskell.org/ghc/docs/latest/html/users_guide/data-type-extensions.html\#nullary-types](http://www.haskell.org/ghc/docs/latest/html/users_guide/data-type-extensions.html#nullary-types) GHC documentation.
|
|
|
|
|
|
The changes to the report necessary to implement the proposal. Required for a proposal to move to the "accepted" state.
|
|
|
## Report Delta
|
|
|
|
|
|
|
|
|
|
... | ... | @@ -209,3 +211,10 @@ with |
|
|
>
|
|
|
>
|
|
|
|
|
|
|
|
|
Also, in the description of when derived instances are possible for a class C [ http://www.haskell.org/onlinereport/derived.html\#derived-appendix](http://www.haskell.org/onlinereport/derived.html#derived-appendix), add the following condition.
|
|
|
|
|
|
|
|
|
|
|
|
1. If the data declaration has no constructors (i.e. when n=0), then no classes are derivable (i.e. m=0).
|
|
|
|