mkSrcLoc, mkSrcSpan )
import Module
import StaticFlags ( opt_SccProfilingOn )
-import Type ( Kind, mkArrowKind, liftedTypeKind )
+import Type ( Kind, mkArrowKind, liftedTypeKind, unliftedTypeKind )
import BasicTypes ( Boxity(..), Fixity(..), FixityDirection(..), IPName(..),
Activation(..), defaultInlineSpec )
import OrdList
: 'qualified' { True }
| {- empty -} { False }
-maybeas :: { Located (Maybe Module) }
+maybeas :: { Located (Maybe ModuleName) }
: 'as' modid { LL (Just (unLoc $2)) }
| {- empty -} { noLoc Nothing }
-----------------------------------------------------------------------------
-- Top-Level Declarations
-topdecls :: { OrdList (LHsDecl RdrName) } -- Reversed
+topdecls :: { OrdList (LHsDecl RdrName) }
: topdecls ';' topdecl { $1 `appOL` $3 }
| topdecls ';' { $1 }
| topdecl { $1 }
-----------------------------------------------------------------------------
-- Nested declarations
-decls :: { Located (OrdList (LHsDecl RdrName)) } -- Reversed
+decls :: { Located (OrdList (LHsDecl RdrName)) }
: decls ';' decl { LL (unLoc $1 `appOL` unLoc $3) }
| decls ';' { LL (unLoc $1) }
| decl { $1 }
| {- empty -} { noLoc nilOL }
-decllist :: { Located (OrdList (LHsDecl RdrName)) } -- Reversed
+decllist :: { Located (OrdList (LHsDecl RdrName)) }
: '{' decls '}' { LL (unLoc $2) }
| vocurly decls close { $2 }
-where :: { Located (OrdList (LHsDecl RdrName)) } -- Reversed
+where :: { Located (OrdList (LHsDecl RdrName)) }
-- No implicit parameters
: 'where' decllist { LL (unLoc $2) }
| {- empty -} { noLoc nilOL }
-----------------------------------------------------------------------------
-- Transformation Rules
-rules :: { OrdList (LHsDecl RdrName) } -- Reversed
+rules :: { OrdList (LHsDecl RdrName) }
: rules ';' rule { $1 `snocOL` $3 }
| rules ';' { $1 }
| rule { unitOL $1 }
-----------------------------------------------------------------------------
-- Deprecations (c.f. rules)
-deprecations :: { OrdList (LHsDecl RdrName) } -- Reversed
+deprecations :: { OrdList (LHsDecl RdrName) }
: deprecations ';' deprecation { $1 `appOL` $3 }
| deprecations ';' { $1 }
| deprecation { $1 }
akind :: { Kind }
: '*' { liftedTypeKind }
+ | '!' { unliftedTypeKind }
| '(' kind ')' { $2 }
-----------------------------------------------------------------------------
-- Miscellaneous (mostly renamings)
-modid :: { Located Module }
- : CONID { L1 $ mkModuleFS (getCONID $1) }
+modid :: { Located ModuleName }
+ : CONID { L1 $ mkModuleNameFS (getCONID $1) }
| QCONID { L1 $ let (mod,c) = getQCONID $1 in
- mkModuleFS
+ mkModuleNameFS
(mkFastString
(unpackFS mod ++ '.':unpackFS c))
}