X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fparser%2FLexer.x;h=316f21f1e9a9368082e73207a421aad51703f437;hp=56d036e9f18a8bc0044da4fec1ebc4d20bbf4e6f;hb=84923cc7de2a93c22a2f72daf9ac863959efae13;hpb=7c48f5e35572afc53f464580c95566abef6d6469 diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x index 56d036e..316f21f 100644 --- a/compiler/parser/Lexer.x +++ b/compiler/parser/Lexer.x @@ -233,6 +233,8 @@ $white_no_nl+ ; "{-#" $whitechar* (DEPRECATED|deprecated) { token ITdeprecated_prag } "{-#" $whitechar* (SCC|scc) { token ITscc_prag } + "{-#" $whitechar* (GENERATED|generated) + { token ITgenerated_prag } "{-#" $whitechar* (CORE|core) { token ITcore_prag } "{-#" $whitechar* (UNPACK|unpack) { token ITunpack_prag } @@ -387,9 +389,9 @@ data Token | ITdata | ITdefault | ITderiving + | ITderived | ITdo | ITelse - | ITfor | IThiding | ITif | ITimport @@ -432,6 +434,7 @@ data Token | ITdeprecated_prag | ITline_prag | ITscc_prag + | ITgenerated_prag | ITcore_prag -- hdaume: core annotations | ITunpack_prag | ITclose_prag @@ -541,7 +544,7 @@ isSpecial :: Token -> Bool -- not as a keyword. isSpecial ITas = True isSpecial IThiding = True -isSpecial ITfor = True +isSpecial ITderived = True isSpecial ITqualified = True isSpecial ITforall = True isSpecial ITexport = True @@ -573,9 +576,9 @@ reservedWordsFM = listToUFM $ ( "data", ITdata, 0 ), ( "default", ITdefault, 0 ), ( "deriving", ITderiving, 0 ), + ( "derived", ITderived, 0 ), ( "do", ITdo, 0 ), ( "else", ITelse, 0 ), - ( "for", ITfor, 0 ), ( "hiding", IThiding, 0 ), ( "if", ITif, 0 ), ( "import", ITimport, 0 ),