<p dir="ltr">At the risk of stating the obvious, have you looked at <a href="https://github.com/ghc/ghc/blob/master/compiler/parser/Parser.y#L2993">https://github.com/ghc/ghc/blob/master/compiler/parser/Parser.y#L2993</a>?</p>
<p dir="ltr">Alan</p>
<div class="gmail_quote">On 21 Jan 2016 4:50 PM, "Jan Stolarek" <<a href="mailto:jan.stolarek@p.lodz.pl">jan.stolarek@p.lodz.pl</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'll take a look at the parser, see if we can do better.<br>
<br>
> I also suggest that keywords introduced by GHC extensions should be lexed as keywords regardless<br>
> of  whether extension is enabled or not: this way users won't get spurious errors if they<br>
> suddenly enable extension and it turns out that some of their identifiers have become keywords.<br>
I would be cautious here. Patch I am working on right now will use "kind" as a reserved<br>
identifier. It will only be allowed after `data` keyword. Making it a reserved word everywhere<br>
would be a major issue as many people doing type-level programming have variables named "kind".<br>
You ar right that problem would be much smaller if the keyword was "datakind" but somehow I am<br>
reluctant to seeing things like "datakindmember", "typeinstance", etc. What others think about<br>
this proposal?<br>
<br>
Janek<br>
<br>
---<br>
Politechnika Łódzka<br>
Lodz University of Technology<br>
<br>
Treść tej wiadomości zawiera informacje przeznaczone tylko dla adresata.<br>
Jeżeli nie jesteście Państwo jej adresatem, bądź otrzymaliście ją przez pomyłkę<br>
prosimy o powiadomienie o tym nadawcy oraz trwałe jej usunięcie.<br>
<br>
This email contains information intended solely for the use of the individual to whom it is addressed.<br>
If you are not the intended recipient or if you have received this message in error,<br>
please notify the sender and delete it from your system.<br>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
</blockquote></div>