HsSyn

ghc-8.6.3: The GHC API

Safe Haskell | None
Language | Haskell2010

HsSyn

Synopsis

- module HsBinds
- module HsDecls
- module HsExpr
- module HsImpExp
- module HsLit
- module HsPat
- module HsTypes
- module HsUtils
- module HsDoc
- module PlaceHolder
- module HsExtension
- data Fixity
- data HsModule pass = HsModule {
  - hsmodName :: Maybe (Located ModuleName)
  - hsmodExports :: Maybe (Located [LIE pass])
  - hsmodImports :: [LImportDecl pass]
  - hsmodDecls :: [LHsDecl pass]
  - hsmodDeprecMessage :: Maybe (Located WarningTxt)
  - hsmodHaddockModHeader :: Maybe LHsDocString
  }

# Documentation

module HsBinds

module HsDecls

module HsExpr

module HsImpExp

module HsLit

module HsPat

module HsTypes

module HsUtils

module HsDoc

module PlaceHolder

module HsExtension

data Fixity #

Instances

Eq Fixity # |
Instance details Defined in BasicTypes Methods (==) :: Fixity -> Fixity -> Bool # (/=) :: Fixity -> Fixity -> Bool #
Data Fixity # |
Instance details Defined in BasicTypes Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Fixity -> c Fixity Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Fixity Source # toConstr :: Fixity -> Constr Source # dataTypeOf :: Fixity -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Fixity) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Fixity) Source # gmapT :: (forall b. Data b => b -> b) -> Fixity -> Fixity Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Fixity -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Fixity -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity Source #
Outputable Fixity # |
Instance details Defined in BasicTypes Methods ppr :: Fixity -> SDoc # pprPrec :: Rational -> Fixity -> SDoc #
Binary Fixity # |
Instance details Defined in Binary Methods put_ :: BinHandle -> Fixity -> IO () # put :: BinHandle -> Fixity -> IO (Bin Fixity) # get :: BinHandle -> IO Fixity #

data HsModule pass #

Haskell Module

All we actually declare here is the top-level structure for a module.

Constructors

HsModule | `AnnKeywordId`s `AnnModule`,`AnnWhere` `AnnOpen`,`AnnSemi`, `AnnClose` for explicit braces and semi around hsmodImports,hsmodDecls if this style is used.
Fields hsmodName :: Maybe (Located ModuleName) `Nothing`: "module X where" is omitted (in which case the next field is Nothing too) hsmodExports :: Maybe (Located [LIE pass]) Export list `Nothing`: export list omitted, so export everything `Just []`: export nothing `Just [...]`: as you would expect... `AnnKeywordId`s : `AnnOpen` ,`AnnClose` hsmodImports :: [LImportDecl pass] We snaffle interesting stuff out of the imported interfaces early on, adding that info to TyDecls/etc; so this list is often empty, downstream. hsmodDecls :: [LHsDecl pass] Type, class, value, and interface signature decls hsmodDeprecMessage :: Maybe (Located WarningTxt) reason/explanation for warning/deprecation of this module `AnnKeywordId`s : `AnnOpen` ,`AnnClose` hsmodHaddockModHeader :: Maybe LHsDocString Haddock module info and description, unparsed `AnnKeywordId`s : `AnnOpen` ,`AnnClose`

Instances

Data (HsModule GhcTc) # |
Instance details Defined in HsSyn Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsModule GhcTc -> c (HsModule GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsModule GhcTc) Source # toConstr :: HsModule GhcTc -> Constr Source # dataTypeOf :: HsModule GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsModule GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsModule GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> HsModule GhcTc -> HsModule GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsModule GhcTc -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsModule GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsModule GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsModule GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsModule GhcTc -> m (HsModule GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule GhcTc -> m (HsModule GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule GhcTc -> m (HsModule GhcTc) Source #
Data (HsModule GhcRn) # |
Instance details Defined in HsSyn Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsModule GhcRn -> c (HsModule GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsModule GhcRn) Source # toConstr :: HsModule GhcRn -> Constr Source # dataTypeOf :: HsModule GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsModule GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsModule GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> HsModule GhcRn -> HsModule GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsModule GhcRn -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsModule GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsModule GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsModule GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsModule GhcRn -> m (HsModule GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule GhcRn -> m (HsModule GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule GhcRn -> m (HsModule GhcRn) Source #
Data (HsModule GhcPs) # |
Instance details Defined in HsSyn Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsModule GhcPs -> c (HsModule GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsModule GhcPs) Source # toConstr :: HsModule GhcPs -> Constr Source # dataTypeOf :: HsModule GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsModule GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsModule GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> HsModule GhcPs -> HsModule GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsModule GhcPs -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsModule GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsModule GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsModule GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsModule GhcPs -> m (HsModule GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule GhcPs -> m (HsModule GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsModule GhcPs -> m (HsModule GhcPs) Source #
(p ~ GhcPass pass, OutputableBndrId p) => Outputable (HsModule p) # |
Instance details Defined in HsSyn Methods ppr :: HsModule p -> SDoc # pprPrec :: Rational -> HsModule p -> SDoc #