- = ImportDecl (Located ModuleName) -- module name
- Bool -- True <=> {-# SOURCE #-} import
- Bool -- True => qualified
- (Maybe ModuleName) -- as Module
- (Maybe (Bool, [LIE name])) -- (True => hiding, names)
+ = ImportDecl {
+ ideclName :: Located ModuleName, -- ^ Module name.
+ ideclPkgQual :: Maybe FastString, -- ^ Package qualifier.
+ ideclSource :: Bool, -- ^ True <=> {-# SOURCE #-} import
+ ideclQualified :: Bool, -- ^ True => qualified
+ ideclAs :: Maybe ModuleName, -- ^ as Module
+ ideclHiding :: Maybe (Bool, [LIE name]) -- ^ (True => hiding, names)
+ } deriving (Data, Typeable)
+
+simpleImportDecl :: ModuleName -> ImportDecl name
+simpleImportDecl mn = ImportDecl {
+ ideclName = noLoc mn,
+ ideclPkgQual = Nothing,
+ ideclSource = False,
+ ideclQualified = False,
+ ideclAs = Nothing,
+ ideclHiding = Nothing
+ }