[Haskell-cafe] an idea for modifiyng data/newtype syntax: use `::=` instead of `=`

Daniel Trstenjak daniel.trstenjak at gmail.com
Tue Aug 18 06:49:40 UTC 2015


Hi Richard,

> AND IT DOES NOT *CLAIM* TO CREATE A TYPE.
> It claims to state a type EQUALITY, and it really does.

I can understand your reasoning and only looking at 'type' it's fine, but
you've to look at 'type/newtype/data' at once, and if 'data' is
strangely named, what other name would you take for it?

> It's just like if you write
> 
>    answer = 42
> 
> This does NOT define a new constant.  It gives a new name for
> an existing value.  Next thing someone will say that this ought
> to be written
> 
>   value_alias answer = 42
> 
> or something.

But with this point of view 'type Sequence t = [t]' is also somehow
bogus and should just be 'Sequence t = [t]'.


Greetings,
Daniel


More information about the Haskell-Cafe mailing list