[Haskell-cafe] Need an example of new type constructor with zero data constructors
jhenahan at me.com
Fri Aug 12 14:59:46 UTC 2016
I think they mean "new type" to mean a data declaration, rather than a
newtype. I had to read it a few times before it clicked for me. Just a
confusion in terminology.
Adam Bergmark <adam at bergmark.nl> writes:
> What you posted is the format for data declarations, not newtypes. Newtypes
> are required to have exactly one constructor:
> newtype [context =>] simpletype = newconstr [deriving]
> On Fri, Aug 12, 2016 at 4:43 PM, James Brown <james.brown5374 at gmail.com>
>> In the Haskell report 2010, a data declaration has the format of:
>> For a new type, there could be zero or more data constructors. What's the
>> use case for a new type that has zero data constructor?
>> Haskell-Cafe mailing list
>> To (un)subscribe, modify options or view archives go to:
>> Only members subscribed via the mailman list are allowed to post.
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 800 bytes
Desc: not available
More information about the Haskell-Cafe