... | ... | @@ -3,7 +3,7 @@ |
|
|
<table><tr><th> Ticket </th>
|
|
|
<th>[\#25](https://gitlab.haskell.org//haskell/prime/issues/25)</th></tr>
|
|
|
<tr><th> Dependencies </th>
|
|
|
<th> names of other proposals on which this one depends
|
|
|
<th> none
|
|
|
</th></tr>
|
|
|
<tr><th> Related </th>
|
|
|
<th>
|
... | ... | @@ -17,12 +17,14 @@ |
|
|
<table><tr><th>[\#78](https://gitlab.haskell.org//haskell/prime/issues/78)</th>
|
|
|
<td>Add infix type constructors</td></tr></table>
|
|
|
|
|
|
Compiler support GHC \[ full (flagname) \| partial (flagname) (comments) \| none \]
|
|
|
nhc98 \[ full (flagname) \| partial (flagname) (comments) \| none \]
|
|
|
Hugs \[ full (flagname) \| partial (flagname) (comments) \| none \]
|
|
|
UHC \[ full (flagname) \| partial (flagname) (comments) \| none \]
|
|
|
JHC \[ full (flagname) \| partial (flagname) (comments) \| none \]
|
|
|
LHC \[ full (flagname) \| partial (flagname) (comments) \| none \]
|
|
|
Compiler support GHC \[ full -fglasgow-exts \]
|
|
|
nhc98 \[ none \]
|
|
|
Hugs \[ none \]
|
|
|
UHC \[ none \]
|
|
|
JHC \[ none \]
|
|
|
LHC \[ full -fglasgow-exts \]
|
|
|
|
|
|
Information from language documentation only. I haven't tried it on any of these systems.
|
|
|
Summary
|
|
|
Allow data declarations with no constructors.
|
|
|
Description
|
... | ... | @@ -69,10 +71,31 @@ contextual error since no interesting instances can be defined. Presumably the r |
|
|
gives a more regular syntax and better error messages than ruling out deriving for empty declarations
|
|
|
syntactically. But the point is that there is a choice.
|
|
|
A simple and natural generalisation of data declarations, seemingly without any hidden complications.
|
|
|
References[ http://www.haskell.org/ghc/docs/latest/html/users_guide/type-extensions.html\#nullary-types](http://www.haskell.org/ghc/docs/latest/html/users_guide/type-extensions.html#nullary-types) GHC documentation.
|
|
|
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.
|
|
|
Report Delta
|
|
|
The changes to the report necessary to implement the proposal. Required for a proposal to move to the "accepted" state.
|
|
|
Download in other formats:[Plain Text](/wiki/EmptyDataDecls?version=6&format=txt)[](http://trac.edgewall.org/)Powered by [Trac 1.2.2](/about)
|
|
|
|
|
|
Replace the syntax in [ http://www.haskell.org/onlinereport/decls.html](http://www.haskell.org/onlinereport/decls.html)**4 Declarations and Bindings**:
|
|
|
|
|
|
topdecl → …
|
|
|
|
|
|
\| data \[context ⇒\] simpletype = constrs \[deriving\]
|
|
|
|
|
|
with
|
|
|
|
|
|
topdecl → …
|
|
|
|
|
|
\| data \[context ⇒\] simpletype \[= constrs\] \[deriving\]
|
|
|
|
|
|
Make the same change in the copy of the syntax at the top of 4.2.1 *Algebraic Datatype Declarations*.
|
|
|
Also in that section, replace the sentence:
|
|
|
|
|
|
This declaration introduces a new type constructor T with one or more constituent data constructors K1, …, Kn.
|
|
|
|
|
|
with
|
|
|
|
|
|
This declaration introduces a new type constructor T with zero or more constituent data constructors K1, …, Kn.
|
|
|
Download in other formats:[Plain Text](/wiki/EmptyDataDecls?version=7&format=txt)[](http://trac.edgewall.org/)Powered by [Trac 1.2.2](/about)
|
|
|
|
|
|
By [Edgewall Software](http://www.edgewall.org/).Visit the Trac open source project at
|
|
|
[http://trac.edgewall.com/](http://trac.edgewall.com/)
|
... | ... | |