-- qualified varids.
{
-{-# OPTIONS -w #-}
+{-# OPTIONS -Wwarn #-}
-- The above warning supression flag is a temporary kludge.
-- While working on this module you are encouraged to remove it and fix
-- any warnings in the module. See
{ token (ITinline_prag True) }
"{-#" $whitechar* (NO(T?)INLINE|no(t?)inline) / { notFollowedByPragmaChar }
{ token (ITinline_prag False) }
+ "{-#" $whitechar* (INLINE|inline)
+ $whitechar+ (CONLIKE|conlike) / { notFollowedByPragmaChar }
+ { token (ITinline_conlike_prag True) }
+ "{-#" $whitechar* (NO(T)?INLINE|no(t?)inline)
+ $whitechar+ (CONLIKE|constructorlike) / { notFollowedByPragmaChar }
+ { token (ITinline_conlike_prag False) }
"{-#" $whitechar* (SPECIALI[SZ]E|speciali[sz]e) / { notFollowedByPragmaChar }
{ token ITspec_prag }
"{-#" $whitechar* (SPECIALI[SZ]E|speciali[sz]e)
-- We ignore all these pragmas, but don't generate a warning for them
-- CFILES is a hugs-only thing.
- "{-#" $whitechar* (OPTIONS_HUGS|options_hugs|OPTIONS_NHC98|options_nhc98|OPTIONS_JHC|options_jhc|CFILES|cfiles) / { notFollowedByPragmaChar }
+ "{-#" $whitechar* (OPTIONS_(HUGS|hugs|NHC98|nhc98|JHC|jhc|YHC|yhc|CATCH|catch|DERIVE|derive)|CFILES|cfiles|CONTRACT|contract) / { notFollowedByPragmaChar }
{ nested_comment lexToken }
-- ToDo: should only be valid inside a pragma:
-- Pragmas
| ITinline_prag Bool -- True <=> INLINE, False <=> NOINLINE
+ | ITinline_conlike_prag Bool -- same
| ITspec_prag -- SPECIALISE
| ITspec_inline_prag Bool -- SPECIALISE INLINE (or NOINLINE)
| ITsource_prag
,("!", ITbang, always)
-- For data T (a::*) = MkT
- ,("*", ITstar, \i -> kindSigsEnabled i || tyFamEnabled i)
+ ,("*", ITstar, always) -- \i -> kindSigsEnabled i || tyFamEnabled i)
-- For 'forall a . t'
- ,(".", ITdot, \i -> explicitForallEnabled i || inRulePrag i)
+ ,(".", ITdot, always) -- \i -> explicitForallEnabled i || inRulePrag i)
,("-<", ITlarrowtail, arrowsEnabled)
,(">-", ITrarrowtail, arrowsEnabled)
-- We've seen 'x, where x is a valid character
-- (i.e. not newline etc) but not a quote or backslash
case alexGetChar' i2 of -- Look ahead one more character
- Nothing -> lit_error
Just ('\'', i3) -> do -- We've seen 'x'
setInput i3
finish_char_tok loc c
_other -> do -- We've seen 'x not followed by quote
+ -- (including the possibility of EOF)
-- If TH is on, just parse the quote only
th_exts <- extension thEnabled
let (AI end _ _) = i1