Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type LImportDecl pass = XRec pass (ImportDecl pass)
- data ImportDeclQualifiedStyle
- importDeclQualifiedStyle :: Maybe EpaLocation -> Maybe EpaLocation -> (Maybe EpaLocation, ImportDeclQualifiedStyle)
- isImportDeclQualified :: ImportDeclQualifiedStyle -> Bool
- data ImportDecl pass
- = ImportDecl {
- ideclExt :: XCImportDecl pass
- ideclSourceSrc :: SourceText
- ideclName :: XRec pass ModuleName
- ideclPkgQual :: ImportDeclPkgQual pass
- ideclSource :: IsBootInterface
- ideclSafe :: Bool
- ideclQualified :: ImportDeclQualifiedStyle
- ideclImplicit :: Bool
- ideclAs :: Maybe (XRec pass ModuleName)
- ideclHiding :: Maybe (Bool, XRec pass [LIE pass])
- | XImportDecl !(XXImportDecl pass)
- = ImportDecl {
- type family ImportDeclPkgQual pass
- data EpAnnImportDecl = EpAnnImportDecl {}
- simpleImportDecl :: ModuleName -> ImportDecl GhcPs
- data IEWrappedName name
- = IEName (LocatedN name)
- | IEPattern EpaLocation (LocatedN name)
- | IEType EpaLocation (LocatedN name)
- type LIEWrappedName name = LocatedA (IEWrappedName name)
- type LIE pass = XRec pass (IE pass)
- data IE pass
- = IEVar (XIEVar pass) (LIEWrappedName (IdP pass))
- | IEThingAbs (XIEThingAbs pass) (LIEWrappedName (IdP pass))
- | IEThingAll (XIEThingAll pass) (LIEWrappedName (IdP pass))
- | IEThingWith (XIEThingWith pass) (LIEWrappedName (IdP pass)) IEWildcard [LIEWrappedName (IdP pass)]
- | IEModuleContents (XIEModuleContents pass) (XRec pass ModuleName)
- | IEGroup (XIEGroup pass) Int (LHsDoc pass)
- | IEDoc (XIEDoc pass) (LHsDoc pass)
- | IEDocNamed (XIEDocNamed pass) String
- | XIE !(XXIE pass)
- data IEWildcard
- ieName :: IE (GhcPass p) -> IdP (GhcPass p)
- ieNames :: IE (GhcPass p) -> [IdP (GhcPass p)]
- ieWrappedLName :: IEWrappedName name -> LocatedN name
- ieWrappedName :: IEWrappedName name -> name
- lieWrappedName :: LIEWrappedName name -> name
- ieLWrappedName :: LIEWrappedName name -> LocatedN name
- replaceWrappedName :: IEWrappedName name1 -> name2 -> IEWrappedName name2
- replaceLWrappedName :: LIEWrappedName name1 -> name2 -> LIEWrappedName name2
- pprImpExp :: (HasOccName name, OutputableBndr name) => name -> SDoc
Documentation
type LImportDecl pass Source #
= XRec pass (ImportDecl pass) | When in a list this may have |
Located Import Declaration
data ImportDeclQualifiedStyle Source #
If/how an import is qualified
.
QualifiedPre |
|
QualifiedPost |
|
NotQualified | Not qualified. |
Instances
importDeclQualifiedStyle :: Maybe EpaLocation -> Maybe EpaLocation -> (Maybe EpaLocation, ImportDeclQualifiedStyle) Source #
Given two possible located qualified
tokens, compute a style
(in a conforming Haskell program only one of the two can be not
Nothing
). This is called from GHC.Parser.
isImportDeclQualified :: ImportDeclQualifiedStyle -> Bool Source #
Convenience function to answer the question if an import decl. is qualified.
data ImportDecl pass Source #
Import Declaration
A single Haskell import
declaration.
ImportDecl | |
| |
XImportDecl !(XXImportDecl pass) |
Instances
Data (ImportDecl GhcPs) Source # | |
Defined in GHC.Hs.Instances gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ImportDecl GhcPs -> c (ImportDecl GhcPs) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ImportDecl GhcPs) # toConstr :: ImportDecl GhcPs -> Constr # dataTypeOf :: ImportDecl GhcPs -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ImportDecl GhcPs)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ImportDecl GhcPs)) # gmapT :: (forall b. Data b => b -> b) -> ImportDecl GhcPs -> ImportDecl GhcPs # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ImportDecl GhcPs -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ImportDecl GhcPs -> r # gmapQ :: (forall d. Data d => d -> u) -> ImportDecl GhcPs -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ImportDecl GhcPs -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ImportDecl GhcPs -> m (ImportDecl GhcPs) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportDecl GhcPs -> m (ImportDecl GhcPs) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportDecl GhcPs -> m (ImportDecl GhcPs) # | |
Data (ImportDecl GhcRn) Source # | |
Defined in GHC.Hs.Instances gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ImportDecl GhcRn -> c (ImportDecl GhcRn) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ImportDecl GhcRn) # toConstr :: ImportDecl GhcRn -> Constr # dataTypeOf :: ImportDecl GhcRn -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ImportDecl GhcRn)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ImportDecl GhcRn)) # gmapT :: (forall b. Data b => b -> b) -> ImportDecl GhcRn -> ImportDecl GhcRn # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ImportDecl GhcRn -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ImportDecl GhcRn -> r # gmapQ :: (forall d. Data d => d -> u) -> ImportDecl GhcRn -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ImportDecl GhcRn -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ImportDecl GhcRn -> m (ImportDecl GhcRn) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportDecl GhcRn -> m (ImportDecl GhcRn) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportDecl GhcRn -> m (ImportDecl GhcRn) # | |
Data (ImportDecl GhcTc) Source # | |
Defined in GHC.Hs.Instances gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ImportDecl GhcTc -> c (ImportDecl GhcTc) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ImportDecl GhcTc) # toConstr :: ImportDecl GhcTc -> Constr # dataTypeOf :: ImportDecl GhcTc -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ImportDecl GhcTc)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ImportDecl GhcTc)) # gmapT :: (forall b. Data b => b -> b) -> ImportDecl GhcTc -> ImportDecl GhcTc # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ImportDecl GhcTc -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ImportDecl GhcTc -> r # gmapQ :: (forall d. Data d => d -> u) -> ImportDecl GhcTc -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ImportDecl GhcTc -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ImportDecl GhcTc -> m (ImportDecl GhcTc) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportDecl GhcTc -> m (ImportDecl GhcTc) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ImportDecl GhcTc -> m (ImportDecl GhcTc) # | |
(OutputableBndrId p, Outputable (Anno (IE (GhcPass p))), Outputable (ImportDeclPkgQual (GhcPass p))) => Outputable (ImportDecl (GhcPass p)) Source # | |
Defined in GHC.Hs.ImpExp | |
type Anno (ImportDecl (GhcPass p)) Source # | |
Defined in GHC.Hs.ImpExp |
type family ImportDeclPkgQual pass Source #
Instances
type ImportDeclPkgQual GhcPs Source # | |
Defined in GHC.Hs.ImpExp | |
type ImportDeclPkgQual GhcRn Source # | |
Defined in GHC.Hs.ImpExp | |
type ImportDeclPkgQual GhcTc Source # | |
Defined in GHC.Hs.ImpExp |
data EpAnnImportDecl Source #
Instances
Data EpAnnImportDecl Source # | |
Defined in GHC.Hs.ImpExp gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EpAnnImportDecl -> c EpAnnImportDecl # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EpAnnImportDecl # toConstr :: EpAnnImportDecl -> Constr # dataTypeOf :: EpAnnImportDecl -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c EpAnnImportDecl) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EpAnnImportDecl) # gmapT :: (forall b. Data b => b -> b) -> EpAnnImportDecl -> EpAnnImportDecl # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EpAnnImportDecl -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EpAnnImportDecl -> r # gmapQ :: (forall d. Data d => d -> u) -> EpAnnImportDecl -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> EpAnnImportDecl -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> EpAnnImportDecl -> m EpAnnImportDecl # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EpAnnImportDecl -> m EpAnnImportDecl # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EpAnnImportDecl -> m EpAnnImportDecl # |
data IEWrappedName name Source #
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
Annotation
is the location of the adornment in
the original source.
IEName (LocatedN name) | no extra |
IEPattern EpaLocation (LocatedN name) | pattern X |
IEType EpaLocation (LocatedN name) | type (:+:) |
Instances
Data name => Data (IEWrappedName name) Source # | |
Defined in GHC.Hs.ImpExp gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IEWrappedName name -> c (IEWrappedName name) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (IEWrappedName name) # toConstr :: IEWrappedName name -> Constr # dataTypeOf :: IEWrappedName name -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (IEWrappedName name)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (IEWrappedName name)) # gmapT :: (forall b. Data b => b -> b) -> IEWrappedName name -> IEWrappedName name # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IEWrappedName name -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IEWrappedName name -> r # gmapQ :: (forall d. Data d => d -> u) -> IEWrappedName name -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> IEWrappedName name -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> IEWrappedName name -> m (IEWrappedName name) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IEWrappedName name -> m (IEWrappedName name) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IEWrappedName name -> m (IEWrappedName name) # | |
HasOccName name => HasOccName (IEWrappedName name) Source # | |
Defined in GHC.Hs.ImpExp occName :: IEWrappedName name -> OccName Source # | |
OutputableBndr name => Outputable (IEWrappedName name) Source # | |
Defined in GHC.Hs.ImpExp ppr :: IEWrappedName name -> SDoc Source # | |
OutputableBndr name => OutputableBndr (IEWrappedName name) Source # | |
Defined in GHC.Hs.ImpExp pprBndr :: BindingSite -> IEWrappedName name -> SDoc Source # pprPrefixOcc :: IEWrappedName name -> SDoc Source # pprInfixOcc :: IEWrappedName name -> SDoc Source # bndrIsJoin_maybe :: IEWrappedName name -> Maybe Int Source # | |
Eq name => Eq (IEWrappedName name) Source # | |
Defined in GHC.Hs.ImpExp (==) :: IEWrappedName name -> IEWrappedName name -> Bool # (/=) :: IEWrappedName name -> IEWrappedName name -> Bool # |
type LIEWrappedName name = LocatedA (IEWrappedName name) Source #
Located name with possible adornment
- AnnKeywordId
s : AnnType
,
AnnPattern
Imported or exported entity.
IEVar (XIEVar pass) (LIEWrappedName (IdP pass)) | Imported or Exported Variable |
IEThingAbs (XIEThingAbs pass) (LIEWrappedName (IdP pass)) | Imported or exported Thing with Absent list The thing is a Class/Type (can't tell)
- |
IEThingAll (XIEThingAll pass) (LIEWrappedName (IdP pass)) | Imported or exported Thing with All imported or exported The thing is a ClassType and the All refers to methodsconstructors |
IEThingWith (XIEThingWith pass) (LIEWrappedName (IdP pass)) IEWildcard [LIEWrappedName (IdP pass)] | Imported or exported Thing With given imported or exported The thing is a Class/Type and the imported or exported things are
methods/constructors and record fields; see Note [IEThingWith]
- |
IEModuleContents (XIEModuleContents pass) (XRec pass ModuleName) | Imported or exported module contents (Export Only) |
IEGroup (XIEGroup pass) Int (LHsDoc pass) | Doc section heading |
IEDoc (XIEDoc pass) (LHsDoc pass) | Some documentation |
IEDocNamed (XIEDocNamed pass) String | Reference to named doc |
XIE !(XXIE pass) |
Instances
Data (IE GhcPs) Source # | |
Defined in GHC.Hs.Instances gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IE GhcPs -> c (IE GhcPs) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (IE GhcPs) # toConstr :: IE GhcPs -> Constr # dataTypeOf :: IE GhcPs -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (IE GhcPs)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (IE GhcPs)) # gmapT :: (forall b. Data b => b -> b) -> IE GhcPs -> IE GhcPs # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IE GhcPs -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IE GhcPs -> r # gmapQ :: (forall d. Data d => d -> u) -> IE GhcPs -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> IE GhcPs -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> IE GhcPs -> m (IE GhcPs) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IE GhcPs -> m (IE GhcPs) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IE GhcPs -> m (IE GhcPs) # | |
Data (IE GhcRn) Source # | |
Defined in GHC.Hs.Instances gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IE GhcRn -> c (IE GhcRn) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (IE GhcRn) # toConstr :: IE GhcRn -> Constr # dataTypeOf :: IE GhcRn -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (IE GhcRn)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (IE GhcRn)) # gmapT :: (forall b. Data b => b -> b) -> IE GhcRn -> IE GhcRn # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IE GhcRn -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IE GhcRn -> r # gmapQ :: (forall d. Data d => d -> u) -> IE GhcRn -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> IE GhcRn -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> IE GhcRn -> m (IE GhcRn) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IE GhcRn -> m (IE GhcRn) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IE GhcRn -> m (IE GhcRn) # | |
Data (IE GhcTc) Source # | |
Defined in GHC.Hs.Instances gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IE GhcTc -> c (IE GhcTc) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (IE GhcTc) # toConstr :: IE GhcTc -> Constr # dataTypeOf :: IE GhcTc -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (IE GhcTc)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (IE GhcTc)) # gmapT :: (forall b. Data b => b -> b) -> IE GhcTc -> IE GhcTc # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IE GhcTc -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IE GhcTc -> r # gmapQ :: (forall d. Data d => d -> u) -> IE GhcTc -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> IE GhcTc -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> IE GhcTc -> m (IE GhcTc) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IE GhcTc -> m (IE GhcTc) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IE GhcTc -> m (IE GhcTc) # | |
OutputableBndrId p => Outputable (IE (GhcPass p)) Source # | |
Eq (IE GhcPs) Source # | |
Eq (IE GhcRn) Source # | |
Eq (IE GhcTc) Source # | |
type Anno (IE (GhcPass p)) Source # | |
Defined in GHC.Hs.ImpExp | |
type Anno (LocatedA (IE (GhcPass p))) Source # | |
Defined in GHC.Hs.ImpExp | |
type Anno [LocatedA (IE (GhcPass p))] Source # | |
Defined in GHC.Hs.ImpExp |
data IEWildcard Source #
Imported or Exported Wildcard
Instances
Data IEWildcard Source # | |
Defined in GHC.Hs.ImpExp gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IEWildcard -> c IEWildcard # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IEWildcard # toConstr :: IEWildcard -> Constr # dataTypeOf :: IEWildcard -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IEWildcard) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IEWildcard) # gmapT :: (forall b. Data b => b -> b) -> IEWildcard -> IEWildcard # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IEWildcard -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IEWildcard -> r # gmapQ :: (forall d. Data d => d -> u) -> IEWildcard -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> IEWildcard -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> IEWildcard -> m IEWildcard # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IEWildcard -> m IEWildcard # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IEWildcard -> m IEWildcard # | |
Eq IEWildcard Source # | |
Defined in GHC.Hs.ImpExp (==) :: IEWildcard -> IEWildcard -> Bool # (/=) :: IEWildcard -> IEWildcard -> Bool # |
ieWrappedLName :: IEWrappedName name -> LocatedN name Source #
ieWrappedName :: IEWrappedName name -> name Source #
lieWrappedName :: LIEWrappedName name -> name Source #
ieLWrappedName :: LIEWrappedName name -> LocatedN name Source #
replaceWrappedName :: IEWrappedName name1 -> name2 -> IEWrappedName name2 Source #
replaceLWrappedName :: LIEWrappedName name1 -> name2 -> LIEWrappedName name2 Source #
pprImpExp :: (HasOccName name, OutputableBndr name) => name -> SDoc Source #