"{-#" $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.)
| ITccallconv
| ITdotnet
| ITmdo
+ | ITiso
+ | ITfamily
-- Pragmas
| ITinline_prag Bool -- True <=> INLINE, False <=> NOINLINE
isSpecial ITccallconv = True
isSpecial ITstdcallconv = True
isSpecial ITmdo = True
+isSpecial ITiso = True
+isSpecial ITfamily = True
isSpecial _ = False
-- the bitmap provided as the third component indicates whether the
( "forall", ITforall, bit tvBit),
( "mdo", ITmdo, bit glaExtsBit),
+ ( "iso", ITiso, bit glaExtsBit),
+ ( "family", ITfamily, bit glaExtsBit),
( "foreign", ITforeign, bit ffiBit),
( "export", ITexport, bit ffiBit),
,("→", 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
]