ghc-lib-parser-9.12.2.20250421: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

Language.Haskell.Syntax

Synopsis

- module Language.Haskell.Syntax.Binds
- module Language.Haskell.Syntax.Decls
- module Language.Haskell.Syntax.Expr
- module Language.Haskell.Syntax.ImpExp
- module Language.Haskell.Syntax.Lit
- module Language.Haskell.Syntax.Module.Name
- module Language.Haskell.Syntax.Pat
- module Language.Haskell.Syntax.Type
- module Language.Haskell.Syntax.Extension
- newtype ModuleName = ModuleName FastString
- data HsModule p
  - = HsModule {
    - hsmodExt :: XCModule p
    - hsmodName :: Maybe (XRec p ModuleName)
    - hsmodExports :: Maybe (XRec p [LIE p])
    - hsmodImports :: [LImportDecl p]
    - hsmodDecls :: [LHsDecl p]
    }
  - | XModule !(XXModule p)

# Documentation

module Language.Haskell.Syntax.Binds

module Language.Haskell.Syntax.Decls

module Language.Haskell.Syntax.Expr

module Language.Haskell.Syntax.ImpExp

module Language.Haskell.Syntax.Lit

module Language.Haskell.Syntax.Module.Name

module Language.Haskell.Syntax.Pat

module Language.Haskell.Syntax.Type

module Language.Haskell.Syntax.Extension

newtype ModuleName Source #

A ModuleName is essentially a simple string, e.g. `Data.List`.

Constructors

ModuleName FastString |

#### Instances

Instances details

NFData ModuleName Source # |
Instance details Defined in Language.Haskell.Syntax.Module.Name Methods rnf :: ModuleName -> () Source #
Data ModuleName Source # |

Instance details

Defined in GHC.Unit.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ModuleName -> c ModuleName Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ModuleName Source #

toConstr :: ModuleName -> Constr Source #

dataTypeOf :: ModuleName -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ModuleName) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ModuleName) Source #

gmapT :: (forall b. Data b => b -> b) -> ModuleName -> ModuleName Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ModuleName -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ModuleName -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> ModuleName -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ModuleName -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ModuleName -> m ModuleName Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ModuleName -> m ModuleName Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ModuleName -> m ModuleName Source #

Show ModuleName Source # |
Instance details Defined in Language.Haskell.Syntax.Module.Name Methods showsPrec :: Int -> ModuleName -> ShowS Source # show :: ModuleName -> String Source # showList :: [ModuleName] -> ShowS Source #
Uniquable ModuleName Source # |
Instance details Defined in GHC.Types.Unique Methods getUnique :: ModuleName -> Unique Source #
Binary ModuleName Source # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> ModuleName -> IO () Source # put :: WriteBinHandle -> ModuleName -> IO (Bin ModuleName) Source # get :: ReadBinHandle -> IO ModuleName Source #
Outputable ModuleName Source # |
Instance details Defined in GHC.Utils.Outputable Methods ppr :: ModuleName -> SDoc Source #
Eq ModuleName Source # |
Instance details Defined in Language.Haskell.Syntax.Module.Name Methods (==) :: ModuleName -> ModuleName -> Bool Source # (/=) :: ModuleName -> ModuleName -> Bool Source #
Ord ModuleName Source # |

Instance details

Defined in Language.Haskell.Syntax.Module.Name

Methods

compare :: ModuleName -> ModuleName -> Ordering Source #

(<) :: ModuleName -> ModuleName -> Bool Source #

(<=) :: ModuleName -> ModuleName -> Bool Source #

(>) :: ModuleName -> ModuleName -> Bool Source #

(>=) :: ModuleName -> ModuleName -> Bool Source #

max :: ModuleName -> ModuleName -> ModuleName Source #

min :: ModuleName -> ModuleName -> ModuleName Source #

type Anno ModuleName Source # |
Instance details Defined in GHC.Hs.ImpExp type Anno ModuleName = SrcSpanAnnA

data HsModule p Source #

Haskell Module

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

Constructors

HsModule |

Fields

- hsmodExt :: XCModule p

  HsModule extension point

- hsmodName :: Maybe (XRec p ModuleName)

  `Nothing`: "module X where" is omitted (in which case the next field is Nothing too)

- hsmodExports :: Maybe (XRec p [LIE p])

  Export list

  - `Nothing`: export list omitted, so export everything
  - `Just []`: export nothing
  - `Just [...]`: as you would expect...
- hsmodImports :: [LImportDecl p]
- hsmodDecls :: [LHsDecl p]

  Type, class, value, and interface signature decls

XModule !(XXModule p) |

#### Instances

Instances details

Data (HsModule GhcPs) Source # |

Instance details

Defined in GHC.Hs

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 :: forall r r'. (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 #

Outputable (HsModule GhcPs) Source # |
Instance details Defined in GHC.Hs Methods ppr :: HsModule GhcPs -> SDoc Source #