\? @varid / { ifExtension ipEnabled } { skip_one_varid ITdupipvarid }
}
+<0,glaexts> {
+ "(#" / { ifExtension unboxedTuplesEnabled `alexAndPred` notFollowedBySymbol }
+ { token IToubxparen }
+ "#)" / { ifExtension unboxedTuplesEnabled }
+ { token ITcubxparen }
+}
+
<glaexts> {
- "(#" / { notFollowedBySymbol } { token IToubxparen }
- "#)" { token ITcubxparen }
"{|" { token ITocurlybar }
"|}" { token ITccurlybar }
}
kindSigsBit = 12 -- Kind signatures on type variables
recursiveDoBit = 13 -- mdo
unicodeSyntaxBit = 14 -- the forall symbol, arrow symbols, etc
+unboxedTuplesBit = 15 -- (# and #)
glaExtsEnabled, ffiEnabled, parrEnabled :: Int -> Bool
always _ = True
kindSigsEnabled flags = testBit flags kindSigsBit
recursiveDoEnabled flags = testBit flags recursiveDoBit
unicodeSyntaxEnabled flags = testBit flags unicodeSyntaxBit
+unboxedTuplesEnabled flags = testBit flags unboxedTuplesBit
-- PState for parsing options pragmas
--
.|. ipBit `setBitIf` dopt Opt_ImplicitParams flags
.|. explicitForallBit `setBitIf` dopt Opt_ScopedTypeVariables flags
.|. explicitForallBit `setBitIf` dopt Opt_PolymorphicComponents flags
+ .|. explicitForallBit `setBitIf` dopt Opt_ExistentialQuantification flags
.|. bangPatBit `setBitIf` dopt Opt_BangPatterns flags
.|. tyFamBit `setBitIf` dopt Opt_TypeFamilies flags
.|. haddockBit `setBitIf` dopt Opt_Haddock flags
.|. kindSigsBit `setBitIf` dopt Opt_KindSignatures flags
.|. recursiveDoBit `setBitIf` dopt Opt_RecursiveDo flags
.|. unicodeSyntaxBit `setBitIf` dopt Opt_UnicodeSyntax flags
+ .|. unboxedTuplesBit `setBitIf` dopt Opt_UnboxedTuples flags
--
setBitIf :: Int -> Bool -> Int
b `setBitIf` cond | cond = bit b