[Haskell-cafe] 'data' syntax - a suggestion

David Menendez dave at zednenem.com
Thu Sep 27 17:36:57 EDT 2007


On 9/27/07, Albert Y. C. Lai <trebla at vex.net> wrote:
>
> jerzy.karczmarczuk at info.unicaen.fr wrote:
> > Data with where?
> > You haven't heard about GADTs?
>
> To avoid clashing with GADT's "where", I propose to rename ok's keyword
> to "wherein", or "wheretype", or something
>
> data B k v = E | F b b wherein type b = B k v
>
> data B k v = E | F b b wheretype b = B k v
>

I'm not sure there is a clash.

data B k v where ...

is easily distinguished from

data B k v = ... where ...

-- 
Dave Menendez <dave at zednenem.com>
<http://www.eyrie.org/~zednenem/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20070927/be35eaeb/attachment-0001.htm


More information about the Haskell-Cafe mailing list