HsImpExp

ghc-7.10.3: The GHC API

Safe Haskell | None
Language | Haskell2010

HsImpExp

Synopsis

- type LImportDecl name = Located (ImportDecl name)
- data ImportDecl name = ImportDecl {
  - ideclSourceSrc :: Maybe SourceText
  - ideclName :: Located ModuleName
  - ideclPkgQual :: Maybe FastString
  - ideclSource :: Bool
  - ideclSafe :: Bool
  - ideclQualified :: Bool
  - ideclImplicit :: Bool
  - ideclAs :: Maybe ModuleName
  - ideclHiding :: Maybe (Bool, Located [LIE name])
  }
- simpleImportDecl :: ModuleName -> ImportDecl name
- type LIE name = Located (IE name)
- data IE name
  - = IEVar (Located name)
  - | IEThingAbs (Located name)
  - | IEThingAll (Located name)
  - | IEThingWith (Located name) [Located name]
  - | IEModuleContents (Located ModuleName)
  - | IEGroup Int HsDocString
  - | IEDoc HsDocString
  - | IEDocNamed String
- ieName :: IE name -> name
- ieNames :: IE a -> [a]
- pprImpExp :: (HasOccName name, OutputableBndr name) => name -> SDoc

# Documentation

type LImportDecl name

Arguments

= Located (ImportDecl name) | When in a list this may have `AnnKeywordId` : `AnnSemi`

data ImportDecl name

A single Haskell `import` declaration.

Constructors

ImportDecl | `AnnKeywordId`s `AnnImport` `AnnOpen`, `AnnClose` for ideclSource `AnnSafe`,`AnnQualified`, `AnnPackageName`,`AnnAs`, `AnnVal` `AnnHiding`,`AnnOpen`, `AnnClose` attached to location in ideclHiding
Fields ideclSourceSrc :: Maybe SourceText ideclName :: Located ModuleName Module name. ideclPkgQual :: Maybe FastString Package qualifier. ideclSource :: Bool True = {-# SOURCE #-} import ideclSafe :: Bool True => safe import ideclQualified :: Bool True => qualified ideclImplicit :: Bool True => implicit import (of Prelude) ideclAs :: Maybe ModuleName as Module ideclHiding :: Maybe (Bool, Located [LIE name]) (True => hiding, names)

Instances

Data name => Data (ImportDecl name) |
(OutputableBndr name, HasOccName name) => Outputable (ImportDecl name) |

simpleImportDecl :: ModuleName -> ImportDecl name

type LIE name

Arguments

= Located (IE name) | When in a list this may have `AnnKeywordId` : `AnnComma`

data IE name

Imported or exported entity.

Constructors

IEVar (Located name) | `AnnKeywordId`s : `AnnPattern`, `AnnType`
IEThingAbs (Located name) | Class/Type (can't tell) - `AnnKeywordId`s : `AnnPattern`, `AnnType`,`AnnVal`
IEThingAll (Located name) | ClassType plus all methodsconstructors `AnnKeywordId`s : `AnnOpen`, `AnnDotdot`,`AnnClose`, `AnnType`
IEThingWith (Located name) [Located name] | ClassType plus some methodsconstructors - `AnnKeywordId`s : `AnnOpen`, `AnnClose`, `AnnComma`, `AnnType`
IEModuleContents (Located ModuleName) | (Export Only) `AnnKeywordId`s : `AnnModule`
IEGroup Int HsDocString | Doc section heading
IEDoc HsDocString | Some documentation
IEDocNamed String | Reference to named doc

Instances

Eq name => Eq (IE name) |
Data name => Data (IE name) |
(HasOccName name, OutputableBndr name) => Outputable (IE name) |

ieName :: IE name -> name

ieNames :: IE a -> [a]

pprImpExp :: (HasOccName name, OutputableBndr name) => name -> SDoc