- '_' { ITunderscore } -- Haskell keywords
- 'as' { ITas }
- 'case' { ITcase }
- 'class' { ITclass }
- 'data' { ITdata }
- 'default' { ITdefault }
- 'deriving' { ITderiving }
- 'do' { ITdo }
- 'else' { ITelse }
- 'hiding' { IThiding }
- 'if' { ITif }
- 'import' { ITimport }
- 'in' { ITin }
- 'infix' { ITinfix }
- 'infixl' { ITinfixl }
- 'infixr' { ITinfixr }
- 'instance' { ITinstance }
- 'let' { ITlet }
- 'module' { ITmodule }
- 'newtype' { ITnewtype }
- 'of' { ITof }
- 'qualified' { ITqualified }
- 'then' { ITthen }
- 'type' { ITtype }
- 'where' { ITwhere }
- '_scc_' { ITscc } -- ToDo: remove
-
- 'forall' { ITforall } -- GHC extension keywords
- 'foreign' { ITforeign }
- 'export' { ITexport }
- 'label' { ITlabel }
- 'dynamic' { ITdynamic }
- 'safe' { ITsafe }
- 'unsafe' { ITunsafe }
- 'with' { ITwith }
- 'stdcall' { ITstdcallconv }
- 'ccall' { ITccallconv }
- 'dotnet' { ITdotnet }
- '_ccall_' { ITccall (False, False, PlayRisky) }
- '_ccall_GC_' { ITccall (False, False, PlaySafe) }
- '_casm_' { ITccall (False, True, PlayRisky) }
- '_casm_GC_' { ITccall (False, True, PlaySafe) }
-
- '{-# SPECIALISE' { ITspecialise_prag }
- '{-# SOURCE' { ITsource_prag }
- '{-# INLINE' { ITinline_prag }
- '{-# NOINLINE' { ITnoinline_prag }
- '{-# RULES' { ITrules_prag }
- '{-# SCC' { ITscc_prag }
- '{-# DEPRECATED' { ITdeprecated_prag }
- '#-}' { ITclose_prag }
-
-{-
- '__interface' { ITinterface } -- interface keywords
- '__export' { IT__export }
- '__instimport' { ITinstimport }
- '__forall' { IT__forall }
- '__letrec' { ITletrec }
- '__coerce' { ITcoerce }
- '__depends' { ITdepends }
- '__inline' { ITinline }
- '__DEFAULT' { ITdefaultbranch }
- '__bot' { ITbottom }
- '__integer' { ITinteger_lit }
- '__float' { ITfloat_lit }
- '__rational' { ITrational_lit }
- '__addr' { ITaddr_lit }
- '__label' { ITlabel_lit }
- '__litlit' { ITlit_lit }
- '__string' { ITstring_lit }
- '__ccall' { ITccall $$ }
- '__scc' { IT__scc }
- '__sccC' { ITsccAllCafs }
-
- '__A' { ITarity }
- '__P' { ITspecialise }
- '__C' { ITnocaf }
- '__U' { ITunfold }
- '__S' { ITstrict $$ }
- '__M' { ITcprinfo $$ }
--}
-
- '..' { ITdotdot } -- reserved symbols
- '::' { ITdcolon }
- '=' { ITequal }
- '\\' { ITlam }
- '|' { ITvbar }
- '<-' { ITlarrow }
- '->' { ITrarrow }
- '@' { ITat }
- '~' { ITtilde }
- '=>' { ITdarrow }
- '-' { ITminus }
- '!' { ITbang }
- '.' { ITdot }
-
- '{' { ITocurly } -- special symbols
- '}' { ITccurly }
- '{|' { ITocurlybar }
- '|}' { ITccurlybar }
- vccurly { ITvccurly } -- virtual close curly (from layout)
- '[' { ITobrack }
- ']' { ITcbrack }
- '[:' { ITopabrack }
- ':]' { ITcpabrack }
- '(' { IToparen }
- ')' { ITcparen }
- '(#' { IToubxparen }
- '#)' { ITcubxparen }
- ';' { ITsemi }
- ',' { ITcomma }
- '`' { ITbackquote }
-
- VARID { ITvarid $$ } -- identifiers
- CONID { ITconid $$ }
- VARSYM { ITvarsym $$ }
- CONSYM { ITconsym $$ }
- QVARID { ITqvarid $$ }
- QCONID { ITqconid $$ }
- QVARSYM { ITqvarsym $$ }
- QCONSYM { ITqconsym $$ }
-
- IPDUPVARID { ITdupipvarid $$ } -- GHC extension
- IPSPLITVARID { ITsplitipvarid $$ } -- GHC extension
-
- CHAR { ITchar $$ }
- STRING { ITstring $$ }
- INTEGER { ITinteger $$ }
- RATIONAL { ITrational $$ }
-
- PRIMCHAR { ITprimchar $$ }
- PRIMSTRING { ITprimstring $$ }
- PRIMINTEGER { ITprimint $$ }
- PRIMFLOAT { ITprimfloat $$ }
- PRIMDOUBLE { ITprimdouble $$ }
- CLITLIT { ITlitlit $$ }
-
-%monad { P } { thenP } { returnP }
-%lexer { lexer } { ITeof }
+ '_' { T _ _ ITunderscore } -- Haskell keywords
+ 'as' { T _ _ ITas }
+ 'case' { T _ _ ITcase }
+ 'class' { T _ _ ITclass }
+ 'data' { T _ _ ITdata }
+ 'default' { T _ _ ITdefault }
+ 'deriving' { T _ _ ITderiving }
+ 'do' { T _ _ ITdo }
+ 'else' { T _ _ ITelse }
+ 'hiding' { T _ _ IThiding }
+ 'if' { T _ _ ITif }
+ 'import' { T _ _ ITimport }
+ 'in' { T _ _ ITin }
+ 'infix' { T _ _ ITinfix }
+ 'infixl' { T _ _ ITinfixl }
+ 'infixr' { T _ _ ITinfixr }
+ 'instance' { T _ _ ITinstance }
+ 'let' { T _ _ ITlet }
+ 'module' { T _ _ ITmodule }
+ 'newtype' { T _ _ ITnewtype }
+ 'of' { T _ _ ITof }
+ 'qualified' { T _ _ ITqualified }
+ 'then' { T _ _ ITthen }
+ 'type' { T _ _ ITtype }
+ 'where' { T _ _ ITwhere }
+ '_scc_' { T _ _ ITscc } -- ToDo: remove
+
+ 'forall' { T _ _ ITforall } -- GHC extension keywords
+ 'foreign' { T _ _ ITforeign }
+ 'export' { T _ _ ITexport }
+ 'label' { T _ _ ITlabel }
+ 'dynamic' { T _ _ ITdynamic }
+ 'safe' { T _ _ ITsafe }
+ 'threadsafe' { T _ _ ITthreadsafe }
+ 'unsafe' { T _ _ ITunsafe }
+ 'with' { T _ _ ITwith }
+ 'mdo' { T _ _ ITmdo }
+ 'stdcall' { T _ _ ITstdcallconv }
+ 'ccall' { T _ _ ITccallconv }
+ 'dotnet' { T _ _ ITdotnet }
+ 'proc' { T _ _ ITproc } -- for arrow notation extension
+ 'rec' { T _ _ ITrec } -- for arrow notation extension
+
+ '{-# SPECIALISE' { T _ _ ITspecialise_prag }
+ '{-# SOURCE' { T _ _ ITsource_prag }
+ '{-# INLINE' { T _ _ ITinline_prag }
+ '{-# NOINLINE' { T _ _ ITnoinline_prag }
+ '{-# RULES' { T _ _ ITrules_prag }
+ '{-# CORE' { T _ _ ITcore_prag } -- hdaume: annotated core
+ '{-# SCC' { T _ _ ITscc_prag }
+ '{-# DEPRECATED' { T _ _ ITdeprecated_prag }
+ '#-}' { T _ _ ITclose_prag }
+
+ '..' { T _ _ ITdotdot } -- reserved symbols
+ ':' { T _ _ ITcolon }
+ '::' { T _ _ ITdcolon }
+ '=' { T _ _ ITequal }
+ '\\' { T _ _ ITlam }
+ '|' { T _ _ ITvbar }
+ '<-' { T _ _ ITlarrow }
+ '->' { T _ _ ITrarrow }
+ '@' { T _ _ ITat }
+ '~' { T _ _ ITtilde }
+ '=>' { T _ _ ITdarrow }
+ '-' { T _ _ ITminus }
+ '!' { T _ _ ITbang }
+ '*' { T _ _ ITstar }
+ '-<' { T _ _ ITlarrowtail } -- for arrow notation
+ '>-' { T _ _ ITrarrowtail } -- for arrow notation
+ '-<<' { T _ _ ITLarrowtail } -- for arrow notation
+ '>>-' { T _ _ ITRarrowtail } -- for arrow notation
+ '.' { T _ _ ITdot }
+
+ '{' { T _ _ ITocurly } -- special symbols
+ '}' { T _ _ ITccurly }
+ '{|' { T _ _ ITocurlybar }
+ '|}' { T _ _ ITccurlybar }
+ vocurly { T _ _ ITvocurly } -- virtual open curly (from layout)
+ vccurly { T _ _ ITvccurly } -- virtual close curly (from layout)
+ '[' { T _ _ ITobrack }
+ ']' { T _ _ ITcbrack }
+ '[:' { T _ _ ITopabrack }
+ ':]' { T _ _ ITcpabrack }
+ '(' { T _ _ IToparen }
+ ')' { T _ _ ITcparen }
+ '(#' { T _ _ IToubxparen }
+ '#)' { T _ _ ITcubxparen }
+ '(|' { T _ _ IToparenbar }
+ '|)' { T _ _ ITcparenbar }
+ ';' { T _ _ ITsemi }
+ ',' { T _ _ ITcomma }
+ '`' { T _ _ ITbackquote }
+
+ VARID { T _ _ (ITvarid $$) } -- identifiers
+ CONID { T _ _ (ITconid $$) }
+ VARSYM { T _ _ (ITvarsym $$) }
+ CONSYM { T _ _ (ITconsym $$) }
+ QVARID { T _ _ (ITqvarid $$) }
+ QCONID { T _ _ (ITqconid $$) }
+ QVARSYM { T _ _ (ITqvarsym $$) }
+ QCONSYM { T _ _ (ITqconsym $$) }
+
+ IPDUPVARID { T _ _ (ITdupipvarid $$) } -- GHC extension
+ IPSPLITVARID { T _ _ (ITsplitipvarid $$) } -- GHC extension
+
+ CHAR { T _ _ (ITchar $$) }
+ STRING { T _ _ (ITstring $$) }
+ INTEGER { T _ _ (ITinteger $$) }
+ RATIONAL { T _ _ (ITrational $$) }
+
+ PRIMCHAR { T _ _ (ITprimchar $$) }
+ PRIMSTRING { T _ _ (ITprimstring $$) }
+ PRIMINTEGER { T _ _ (ITprimint $$) }
+ PRIMFLOAT { T _ _ (ITprimfloat $$) }
+ PRIMDOUBLE { T _ _ (ITprimdouble $$) }
+
+-- Template Haskell
+'[|' { T _ _ ITopenExpQuote }
+'[p|' { T _ _ ITopenPatQuote }
+'[t|' { T _ _ ITopenTypQuote }
+'[d|' { T _ _ ITopenDecQuote }
+'|]' { T _ _ ITcloseQuote }
+ID_SPLICE { T _ _ (ITidEscape $$) } -- $x
+'$(' { T _ _ ITparenEscape } -- $( exp )
+REIFY_TYPE { T _ _ ITreifyType }
+REIFY_DECL { T _ _ ITreifyDecl }
+REIFY_FIXITY { T _ _ ITreifyFixity }
+
+%monad { P } { >>= } { return }
+%lexer { lexer } { T _ _ ITeof }