Special treatment of family and role in the parser

Alan & Kim Zimmerman alan.zimm at gmail.com
Thu Jan 21 14:58:12 UTC 2016


At the risk of stating the obvious, have you looked at
https://github.com/ghc/ghc/blob/master/compiler/parser/Parser.y#L2993?

Alan
On 21 Jan 2016 4:50 PM, "Jan Stolarek" <jan.stolarek at p.lodz.pl> wrote:

> I'll take a look at the parser, see if we can do better.
>
> > I also suggest that keywords introduced by GHC extensions should be
> lexed as keywords regardless
> > of  whether extension is enabled or not: this way users won't get
> spurious errors if they
> > suddenly enable extension and it turns out that some of their
> identifiers have become keywords.
> I would be cautious here. Patch I am working on right now will use "kind"
> as a reserved
> identifier. It will only be allowed after `data` keyword. Making it a
> reserved word everywhere
> would be a major issue as many people doing type-level programming have
> variables named "kind".
> You ar right that problem would be much smaller if the keyword was
> "datakind" but somehow I am
> reluctant to seeing things like "datakindmember", "typeinstance", etc.
> What others think about
> this proposal?
>
> Janek
>
> ---
> Politechnika Łódzka
> Lodz University of Technology
>
> Treść tej wiadomości zawiera informacje przeznaczone tylko dla adresata.
> Jeżeli nie jesteście Państwo jej adresatem, bądź otrzymaliście ją przez
> pomyłkę
> prosimy o powiadomienie o tym nadawcy oraz trwałe jej usunięcie.
>
> This email contains information intended solely for the use of the
> individual to whom it is addressed.
> If you are not the intended recipient or if you have received this message
> in error,
> please notify the sender and delete it from your system.
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20160121/2f7aaf75/attachment.html>


More information about the ghc-devs mailing list