Located Import Declaration
Moduleghc-9.10.3GHC2021
Language.Haskell.Syntax.ImpExp
- 11 types
- Packageghc-9.10.3
- Exports11
- LanguageGHC2021
- LicenceBSD-3-Clause
- SourceImpExp.hs
If/how an import is qualified.
Constructors
QualifiedPrequalifiedappears in prepositive position.QualifiedPostqualifiedappears in postpositive position.NotQualifiedNot qualified.
Instances2Eq, Data
Eq ImportDeclQualifiedStyleDefined in ghc-9.10.3 · Language.Haskell.Syntax.ImpExpData ImportDeclQualifiedStyleDefined in ghc-9.10.3 · Language.Haskell.Syntax.ImpExp
Indicates whether a module name is referring to a boot interface (hs-boot file) or regular module (hs file). We need to treat boot modules specially when building compilation graphs, since they break cycles. Regular source files and signature files are treated equivalently.
Instances5Eq, Data, Ord, Show, Binary
Eq IsBootInterfaceDefined in ghc-9.10.3 · Language.Haskell.Syntax.ImpExpData IsBootInterfaceDefined in ghc-9.10.3 · Language.Haskell.Syntax.ImpExpOrd IsBootInterfaceDefined in ghc-9.10.3 · Language.Haskell.Syntax.ImpExpShow IsBootInterfaceDefined in ghc-9.10.3 · Language.Haskell.Syntax.ImpExpBinary IsBootInterfaceDefined in ghc-9.10.3 · GHC.Unit.Types · orphan
Import Declaration
A single Haskell import declaration.
Constructors
ImportDeclideclExt :: XCImportDecl passideclName :: XRec pass ModuleNameModule name.
ideclPkgQual :: ImportDeclPkgQual passPackage qualifier.
ideclSource :: IsBootInterfaceIsBoot = {-# SOURCE #-} import
ideclSafe :: BoolTrue => safe import
ideclQualified :: ImportDeclQualifiedStyleIf/how the import is qualified.
ideclAs :: Maybe (XRec pass ModuleName)as Module
ideclImportList :: Maybe (ImportListInterpretation, XRec pass [LIE pass])Explicit import list (EverythingBut => hiding, names)
XImportDecl !(XXImportDecl pass)
Instances6Data, Outputable, ToHie, Anno
Data (ImportDecl GhcPs)Defined in ghc-9.10.3 · GHC.Hs.Instances · orphanData (ImportDecl GhcRn)Defined in ghc-9.10.3 · GHC.Hs.Instances · orphanData (ImportDecl GhcTc)Defined in ghc-9.10.3 · GHC.Hs.Instances · orphan(OutputableBndrId p, Outputable (Anno (IE (GhcPass p))), Outputable (ImportDeclPkgQual (GhcPass p))) => Outputable (ImportDecl (GhcPass p))Defined in ghc-9.10.3 · GHC.Hs.ImpExp · orphanToHie (LocatedA (ImportDecl GhcRn))Defined in ghc-9.10.3 · GHC.Iface.Ext.Asttype Anno (ImportDecl (GhcPass p)) = SrcSpanAnnADefined in ghc-9.10.3 · GHC.Hs.ImpExp · orphan
Whether the import list is exactly what to import, or whether hiding was
used, and therefore everything but what was listed should be imported
Instances2Eq, Data
Eq ImportListInterpretationDefined in ghc-9.10.3 · Language.Haskell.Syntax.ImpExpData ImportListInterpretationDefined in ghc-9.10.3 · Language.Haskell.Syntax.ImpExp
Located Import or Export
A docstring attached to an export list item.
Imported or exported entity.
Constructors
IEVar (XIEVar pass) (LIEWrappedName pass) (Maybe (ExportDoc pass))Imported or exported variable
module Mod ( test ) import Mod ( test )IEThingAbs (XIEThingAbs pass) (LIEWrappedName pass) (Maybe (ExportDoc pass))Imported or exported Thing with absent subordinate list
The thing is a typeclass or type (can't tell) - AnnKeywordIds : AnnPattern, AnnType,AnnVal
module Mod ( Test ) import Mod ( Test )IEThingAll (XIEThingAll pass) (LIEWrappedName pass) (Maybe (ExportDoc pass))Imported or exported thing with wildcard subordinate list (e..g
(..))The thing is a ClassType and the All refers to methodsconstructors
AnnKeywordIds : AnnOpen, AnnDotdot,AnnClose, AnnType
module Mod ( Test(..) ) import Mod ( Test(..) )
IEThingWith (XIEThingWith pass) (LIEWrappedName pass) IEWildcard [LIEWrappedName pass] (Maybe (ExportDoc pass))Imported or exported thing with explicit subordinate list.
The thing is a Class/Type and the imported or exported things are its children. - AnnKeywordIds : AnnOpen, AnnClose, AnnComma, AnnType
module Mod ( Test(..) ) import Mod ( Test(..) )IEModuleContents (XIEModuleContents pass) (XRec pass ModuleName)Imported or exported module contents
(Export Only)
module Mod ( module Mod2 )IEGroup (XIEGroup pass) Int (LHsDoc pass)Doc section heading ^ A Haddock section in an export list.
module Mod ( -- * Section heading ... )IEDoc (XIEDoc pass) (LHsDoc pass)Some documentation ^ A bit of unnamed documentation.
module Mod ( -- | Documentation ... )IEDocNamed (XIEDocNamed pass) StringReference to named doc ^ A reference to a named documentation chunk.
module Mod ( -- $chunkName ... )XIE !(XXIE pass)
Instances13Eq, Data, Outputable, ToHie, HasHaddock, Anno, …
Eq (IE GhcPs)Defined in ghc-9.10.3 · GHC.Hs.Instances · orphanEq (IE GhcRn)Defined in ghc-9.10.3 · GHC.Hs.Instances · orphanEq (IE GhcTc)Defined in ghc-9.10.3 · GHC.Hs.Instances · orphanData (IE GhcPs)Defined in ghc-9.10.3 · GHC.Hs.Instances · orphanData (IE GhcRn)Defined in ghc-9.10.3 · GHC.Hs.Instances · orphanData (IE GhcTc)Defined in ghc-9.10.3 · GHC.Hs.Instances · orphanOutputableBndrId p => Outputable (IE (GhcPass p))Defined in ghc-9.10.3 · GHC.Hs.ImpExp · orphanToHie (IEContext (LocatedA (IE GhcRn)))Defined in ghc-9.10.3 · GHC.Iface.Ext.AstHasHaddock (LocatedA (IE GhcPs))Defined in ghc-9.10.3 · GHC.Parser.PostProcess.HaddockHasHaddock (LocatedL [LocatedA (IE GhcPs)])Defined in ghc-9.10.3 · GHC.Parser.PostProcess.HaddockOnly for module exports, not module imports.
module M (a, b, c) where -- use on this [LIE GhcPs] import I (a, b, c) -- do not use here!
Imports cannot have documentation comments anyway.
type Anno (LocatedA (IE (GhcPass p))) = SrcSpanAnnADefined in ghc-9.10.3 · GHC.Hs.ImpExp · orphantype Anno (IE (GhcPass p)) = SrcSpanAnnADefined in ghc-9.10.3 · GHC.Hs.ImpExp · orphantype Anno [LocatedA (IE (GhcPass p))] = SrcSpanAnnLDefined in ghc-9.10.3 · GHC.Hs.ImpExp · orphan
Wildcard in an import or export sublist, like the .. in
import Mod ( T(Mk1, Mk2, ..) ).
Constructors
NoIEWildcardno wildcard in this list
IEWildcard Intwildcard after the given # of items in this list The
Intis in the range [0..n], where n is the length of the list.
Instances2Eq, Data
Eq IEWildcardDefined in ghc-9.10.3 · Language.Haskell.Syntax.ImpExpData IEWildcardDefined in ghc-9.10.3 · Language.Haskell.Syntax.ImpExp
A name in an import or export specification which may have
adornments. Used primarily for accurate pretty printing of
ParsedSource, and API Annotation placement. The
GHC.Parser.Annotation is the location of the adornment in
the original source.
Constructors
IEName (XIEName p) (LIdP p)no extra
IEPattern (XIEPattern p) (LIdP p)pattern X
IEType (XIEType p) (LIdP p)type (:+:)
XIEWrappedName !(XXIEWrappedName p)
Instances11Eq, Data, Outputable, OutputableBndr, HasOccName, ToHie, …
Eq (IEWrappedName GhcPs)Defined in ghc-9.10.3 · GHC.Hs.ImpExp · orphanEq (IEWrappedName GhcRn)Defined in ghc-9.10.3 · GHC.Hs.ImpExp · orphanEq (IEWrappedName GhcTc)Defined in ghc-9.10.3 · GHC.Hs.ImpExp · orphanData (IEWrappedName GhcPs)Defined in ghc-9.10.3 · GHC.Hs.ImpExp · orphanData (IEWrappedName GhcRn)Defined in ghc-9.10.3 · GHC.Hs.ImpExp · orphanData (IEWrappedName GhcTc)Defined in ghc-9.10.3 · GHC.Hs.ImpExp · orphanOutputableBndrId p => Outputable (IEWrappedName (GhcPass p))Defined in ghc-9.10.3 · GHC.Hs.ImpExp · orphanOutputableBndrId p => OutputableBndr (IEWrappedName (GhcPass p))Defined in ghc-9.10.3 · GHC.Hs.ImpExp · orphan(HasOccName (IdP (GhcPass p)), OutputableBndrId p) => HasOccName (IEWrappedName (GhcPass p))Defined in ghc-9.10.3 · GHC.Hs.ImpExp · orphanToHie (IEContext (LocatedA (IEWrappedName GhcRn)))Defined in ghc-9.10.3 · GHC.Iface.Ext.Asttype Anno (IEWrappedName (GhcPass _1)) = SrcSpanAnnADefined in ghc-9.10.3 · GHC.Hs.ImpExp · orphan
Located name with possible adornment - AnnKeywordIds : AnnType, AnnPattern