X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fparser%2FLexer.x;h=0b02f41a9b4cac54850062c8900f4581ee60bc6a;hb=56dfaffd65d96d27a74c906c2201fd392e06f154;hp=f6863c6286083b64ae1136f9bb08fa95a40c93f5;hpb=77452bc2888f3fd071774b1177868e95f85a43dc;p=ghc-hetmet.git diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x index f6863c6..0b02f41 100644 --- a/compiler/parser/Lexer.x +++ b/compiler/parser/Lexer.x @@ -216,6 +216,11 @@ $white_no_nl+ ; "{-#" $whitechar* (INCLUDE|include) { lex_string_prag ITinclude_prag } } +<0,option_prags,glaexts> { + -- This is to catch things like {-# OPTIONS OPTIONS_HUGS ... + "{-#" $whitechar* $idchar+ { nested_comment } +} + -- '0' state: ordinary lexemes -- 'glaexts' state: glasgow extensions (postfix '#', etc.) @@ -583,6 +588,9 @@ reservedSymsFM = listToUFM $ ,("→", ITrarrow, bit glaExtsBit) ,("←", ITlarrow, bit glaExtsBit) ,("⋯", ITdotdot, bit glaExtsBit) + -- ToDo: ideally, → and ∷ should be "specials", so that they cannot + -- form part of a large operator. This would let us have a better + -- syntax for kinds: ɑ∷*→* would be a legal kind signature. (maybe). #endif ]