Add (a) CoreM monad, (b) new Annotations feature
[ghc-hetmet.git] / compiler / parser / Lexer.x
index 19927d1..0dd36ff 100644 (file)
@@ -261,6 +261,7 @@ $tab+         { warn Opt_WarnTabs (text "Tab character") }
                                        { token ITgenerated_prag }
   "{-#" $whitechar* (CORE|core)                { token ITcore_prag }
   "{-#" $whitechar* (UNPACK|unpack)    { token ITunpack_prag }
+  "{-#" $whitechar* (ANN|ann)          { token ITann_prag }
 
   -- We ignore all these pragmas, but don't generate a warning for them
   -- CFILES is a hugs-only thing.
@@ -490,6 +491,7 @@ data Token
   | ITgenerated_prag
   | ITcore_prag                 -- hdaume: core annotations
   | ITunpack_prag
+  | ITann_prag
   | ITclose_prag
   | IToptions_prag String
   | ITinclude_prag String
@@ -1556,13 +1558,13 @@ alexGetChar (AI loc ofs s)
                  DecimalNumber         -> digit
                  LetterNumber          -> other_graphic
                  OtherNumber           -> other_graphic
-                 ConnectorPunctuation  -> other_graphic
-                 DashPunctuation       -> other_graphic
+                 ConnectorPunctuation  -> symbol
+                 DashPunctuation       -> symbol
                  OpenPunctuation       -> other_graphic
                  ClosePunctuation      -> other_graphic
                  InitialQuote          -> other_graphic
                  FinalQuote            -> other_graphic
-                 OtherPunctuation      -> other_graphic
+                 OtherPunctuation      -> symbol
                  MathSymbol            -> symbol
                  CurrencySymbol        -> symbol
                  ModifierSymbol        -> symbol