haskell-src-1.0.4.2: Support for manipulating Haskell source code

Copyright | (c) The GHC Team 1997-2000
License | BSD-3-Clause
Maintainer | Andreas Abel
Stability | stable
Portability | portable
Safe Haskell | None
Language | Haskell98

Language.Haskell.Syntax

Contents

- Modules
- Declarations
- Class Assertions and Contexts
- Types
- Expressions
- Patterns
- Literals
- Variables, Constructors and Operators
- Builtin names
  - Modules
  - Main function of a program
  - Constructors
  - Type constructors
- Source coordinates

Description

A suite of datatypes describing the abstract syntax of Haskell 98 plus a few extensions:

- multi-parameter type classes
- parameters of type class assertions are unrestricted

For GHC, we also derive `Data` for all types.

Synopsis

- data HsModule = HsModule SrcLoc Module (Maybe [HsExportSpec]) [HsImportDecl] [HsDecl]
- data HsExportSpec
  - = HsEVar HsQName
  - | HsEAbs HsQName
  - | HsEThingAll HsQName
  - | HsEThingWith HsQName [HsCName]
  - | HsEModuleContents Module
- data HsImportDecl = HsImportDecl {
  - importLoc :: SrcLoc
  - importModule :: Module
  - importQualified :: Bool
  - importAs :: Maybe Module
  - importSpecs :: Maybe (Bool, [HsImportSpec])
  }
- data HsImportSpec
  - = HsIVar HsName
  - | HsIAbs HsName
  - | HsIThingAll HsName
  - | HsIThingWith HsName [HsCName]
- data HsAssoc
  - = HsAssocNone
  - | HsAssocLeft
  - | HsAssocRight
- data HsDecl
  - = HsTypeDecl SrcLoc HsName [HsName] HsType
  - | HsDataDecl SrcLoc HsContext HsName [HsName] [HsConDecl] [HsQName]
  - | HsInfixDecl SrcLoc HsAssoc Int [HsOp]
  - | HsNewTypeDecl SrcLoc HsContext HsName [HsName] HsConDecl [HsQName]
  - | HsClassDecl SrcLoc HsContext HsName [HsName] [HsDecl]
  - | HsInstDecl SrcLoc HsContext HsQName [HsType] [HsDecl]
  - | HsDefaultDecl SrcLoc [HsType]
  - | HsTypeSig SrcLoc [HsName] HsQualType
  - | HsFunBind [HsMatch]
  - | HsPatBind SrcLoc HsPat HsRhs [HsDecl]
  - | HsForeignImport SrcLoc String HsSafety String HsName HsType
  - | HsForeignExport SrcLoc String String HsName HsType
- data HsConDecl
  - = HsConDecl SrcLoc HsName [HsBangType]
  - | HsRecDecl SrcLoc HsName [([HsName], HsBangType)]
- data HsBangType
  - = HsBangedTy HsType
  - | HsUnBangedTy HsType
- data HsMatch = HsMatch SrcLoc HsName [HsPat] HsRhs [HsDecl]
- data HsRhs
  - = HsUnGuardedRhs HsExp
  - | HsGuardedRhss [HsGuardedRhs]
- data HsGuardedRhs = HsGuardedRhs SrcLoc HsExp HsExp
- data HsSafety
  - = HsSafe
  - | HsUnsafe
- data HsQualType = HsQualType HsContext HsType
- type HsContext = [HsAsst]
- type HsAsst = (HsQName, [HsType])
- data HsType
  - = HsTyFun HsType HsType
  - | HsTyTuple [HsType]
  - | HsTyApp HsType HsType
  - | HsTyVar HsName
  - | HsTyCon HsQName
- data HsExp
  - = HsVar HsQName
  - | HsCon HsQName
  - | HsLit HsLiteral
  - | HsInfixApp HsExp HsQOp HsExp
  - | HsApp HsExp HsExp
  - | HsNegApp HsExp
  - | HsLambda SrcLoc [HsPat] HsExp
  - | HsLet [HsDecl] HsExp
  - | HsIf HsExp HsExp HsExp
  - | HsCase HsExp [HsAlt]
  - | HsDo [HsStmt]
  - | HsTuple [HsExp]
  - | HsList [HsExp]
  - | HsParen HsExp
  - | HsLeftSection HsExp HsQOp
  - | HsRightSection HsQOp HsExp
  - | HsRecConstr HsQName [HsFieldUpdate]
  - | HsRecUpdate HsExp [HsFieldUpdate]
  - | HsEnumFrom HsExp
  - | HsEnumFromTo HsExp HsExp
  - | HsEnumFromThen HsExp HsExp
  - | HsEnumFromThenTo HsExp HsExp HsExp
  - | HsListComp HsExp [HsStmt]
  - | HsExpTypeSig SrcLoc HsExp HsQualType
  - | HsAsPat HsName HsExp
  - | HsWildCard
  - | HsIrrPat HsExp
- data HsStmt
  - = HsGenerator SrcLoc HsPat HsExp
  - | HsQualifier HsExp
  - | HsLetStmt [HsDecl]
- data HsFieldUpdate = HsFieldUpdate HsQName HsExp
- data HsAlt = HsAlt SrcLoc HsPat HsGuardedAlts [HsDecl]
- data HsGuardedAlts
  - = HsUnGuardedAlt HsExp
  - | HsGuardedAlts [HsGuardedAlt]
- data HsGuardedAlt = HsGuardedAlt SrcLoc HsExp HsExp
- data HsPat
  - = HsPVar HsName
  - | HsPLit HsLiteral
  - | HsPNeg HsPat
  - | HsPInfixApp HsPat HsQName HsPat
  - | HsPApp HsQName [HsPat]
  - | HsPTuple [HsPat]
  - | HsPList [HsPat]
  - | HsPParen HsPat
  - | HsPRec HsQName [HsPatField]
  - | HsPAsPat HsName HsPat
  - | HsPWildCard
  - | HsPIrrPat HsPat
- data HsPatField = HsPFieldPat HsQName HsPat
- data HsLiteral
  - = HsChar Char
  - | HsString String
  - | HsInt Integer
  - | HsFrac Rational
  - | HsCharPrim Char
  - | HsStringPrim String
  - | HsIntPrim Integer
  - | HsFloatPrim Rational
  - | HsDoublePrim Rational
- newtype Module = Module String
- data HsQName
  - = Qual Module HsName
  - | UnQual HsName
  - | Special HsSpecialCon
- data HsName
  - = HsIdent String
  - | HsSymbol String
- data HsQOp
  - = HsQVarOp HsQName
  - | HsQConOp HsQName
- data HsOp
  - = HsVarOp HsName
  - | HsConOp HsName
- data HsSpecialCon
  - = HsUnitCon
  - | HsListCon
  - | HsFunCon
  - | HsTupleCon Int
  - | HsCons
- data HsCName
  - = HsVarName HsName
  - | HsConName HsName
- prelude_mod :: Module
- main_mod :: Module
- main_name :: HsName
- unit_con_name :: HsQName
- tuple_con_name :: Int -> HsQName
- list_cons_name :: HsQName
- unit_con :: HsExp
- tuple_con :: Int -> HsExp
- unit_tycon_name :: HsQName
- fun_tycon_name :: HsQName
- list_tycon_name :: HsQName
- tuple_tycon_name :: Int -> HsQName
- unit_tycon :: HsType
- fun_tycon :: HsType
- list_tycon :: HsType
- tuple_tycon :: Int -> HsType
- data SrcLoc = SrcLoc {
  - srcFilename :: String
  - srcLine :: Int
  - srcColumn :: Int
  }

# Modules

data HsModule Source #

A Haskell source module.

Constructors

HsModule SrcLoc Module (Maybe [HsExportSpec]) [HsImportDecl] [HsDecl] |

#### Instances

Instances details

Data HsModule Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsModule -> Constr Source #

dataTypeOf :: HsModule -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsModule Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsModule -> ShowS Source # show :: HsModule -> String Source # showList :: [HsModule] -> ShowS Source #
Eq HsModule Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsModule -> HsModule -> Bool Source # (/=) :: HsModule -> HsModule -> Bool Source #
Pretty HsModule Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsModule -> Doc prettyPrec :: Int -> HsModule -> Doc

data HsExportSpec Source #

Export specification.

Constructors

HsEVar HsQName | Variable.
HsEAbs HsQName | `T`: A class or datatype exported abstractly, or a type synonym.
HsEThingAll HsQName | `T(..)`: A class exported with all of its methods, or a datatype exported with all of its constructors.
HsEThingWith HsQName [HsCName] | `T(C_1,...,C_n)`: A class exported with some of its methods, or a datatype exported with some of its constructors.
HsEModuleContents Module | `module M`: Re-export a module.

#### Instances

Instances details

Data HsExportSpec Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsExportSpec -> Constr Source #

dataTypeOf :: HsExportSpec -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsExportSpec Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsExportSpec -> ShowS Source # show :: HsExportSpec -> String Source # showList :: [HsExportSpec] -> ShowS Source #
Eq HsExportSpec Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsExportSpec -> HsExportSpec -> Bool Source # (/=) :: HsExportSpec -> HsExportSpec -> Bool Source #
Pretty HsExportSpec Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsExportSpec -> Doc prettyPrec :: Int -> HsExportSpec -> Doc

data HsImportDecl Source #

Import declaration.

Constructors

HsImportDecl |

Fields

- importLoc :: SrcLoc

  Position of the `import` keyword.

- importModule :: Module

  Name of the module imported.

- importQualified :: Bool

  Imported `qualified`?

- importAs :: Maybe Module

  Optional alias name in an `as` clause.

- importSpecs :: Maybe (Bool, [HsImportSpec])

  Optional list of import specifications. The `Bool` is `True` if the names are excluded by `hiding`.

#### Instances

Instances details

Data HsImportDecl Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsImportDecl -> Constr Source #

dataTypeOf :: HsImportDecl -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsImportDecl Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsImportDecl -> ShowS Source # show :: HsImportDecl -> String Source # showList :: [HsImportDecl] -> ShowS Source #
Eq HsImportDecl Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsImportDecl -> HsImportDecl -> Bool Source # (/=) :: HsImportDecl -> HsImportDecl -> Bool Source #
Pretty HsImportDecl Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsImportDecl -> Doc prettyPrec :: Int -> HsImportDecl -> Doc

data HsImportSpec Source #

Import specification.

Constructors

HsIVar HsName | Variable.
HsIAbs HsName | `T`: The name of a class, datatype or type synonym.
HsIThingAll HsName | `T(..)`: A class imported with all of its methods, or a datatype imported with all of its constructors.
HsIThingWith HsName [HsCName] | `T(C_1,...,C_n)`: A class imported with some of its methods, or a datatype imported with some of its constructors.

#### Instances

Instances details

Data HsImportSpec Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsImportSpec -> Constr Source #

dataTypeOf :: HsImportSpec -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsImportSpec Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsImportSpec -> ShowS Source # show :: HsImportSpec -> String Source # showList :: [HsImportSpec] -> ShowS Source #
Eq HsImportSpec Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsImportSpec -> HsImportSpec -> Bool Source # (/=) :: HsImportSpec -> HsImportSpec -> Bool Source #
Pretty HsImportSpec Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsImportSpec -> Doc prettyPrec :: Int -> HsImportSpec -> Doc

data HsAssoc Source #

Associativity of an operator.

Constructors

HsAssocNone | Non-associative operator (declared with `infix`).
HsAssocLeft | Left-associative operator (declared with `infixl`).
HsAssocRight | Right-associative operator (declared with `infixr`).

#### Instances

Instances details

Data HsAssoc Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsAssoc -> Constr Source #

dataTypeOf :: HsAssoc -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsAssoc Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsAssoc -> ShowS Source # show :: HsAssoc -> String Source # showList :: [HsAssoc] -> ShowS Source #
Eq HsAssoc Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsAssoc -> HsAssoc -> Bool Source # (/=) :: HsAssoc -> HsAssoc -> Bool Source #
Pretty HsAssoc Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsAssoc -> Doc prettyPrec :: Int -> HsAssoc -> Doc

# Declarations

data HsDecl Source #

Constructors

HsTypeDecl SrcLoc HsName [HsName] HsType |
HsDataDecl SrcLoc HsContext HsName [HsName] [HsConDecl] [HsQName] |
HsInfixDecl SrcLoc HsAssoc Int [HsOp] |
HsNewTypeDecl SrcLoc HsContext HsName [HsName] HsConDecl [HsQName] |
HsClassDecl SrcLoc HsContext HsName [HsName] [HsDecl] |
HsInstDecl SrcLoc HsContext HsQName [HsType] [HsDecl] |
HsDefaultDecl SrcLoc [HsType] |
HsTypeSig SrcLoc [HsName] HsQualType |
HsFunBind [HsMatch] |
HsPatBind SrcLoc HsPat HsRhs [HsDecl] |
HsForeignImport SrcLoc String HsSafety String HsName HsType |
HsForeignExport SrcLoc String String HsName HsType |

#### Instances

Instances details

Data HsDecl Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsDecl -> Constr Source #

dataTypeOf :: HsDecl -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsDecl Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsDecl -> ShowS Source # show :: HsDecl -> String Source # showList :: [HsDecl] -> ShowS Source #
Eq HsDecl Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsDecl -> HsDecl -> Bool Source # (/=) :: HsDecl -> HsDecl -> Bool Source #
Pretty HsDecl Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsDecl -> Doc prettyPrec :: Int -> HsDecl -> Doc

data HsConDecl Source #

Declaration of a data constructor.

Constructors

HsConDecl SrcLoc HsName [HsBangType] | Ordinary data constructor.
HsRecDecl SrcLoc HsName [([HsName], HsBangType)] | Record constructor.

#### Instances

Instances details

Data HsConDecl Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsConDecl -> Constr Source #

dataTypeOf :: HsConDecl -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsConDecl Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsConDecl -> ShowS Source # show :: HsConDecl -> String Source # showList :: [HsConDecl] -> ShowS Source #
Eq HsConDecl Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsConDecl -> HsConDecl -> Bool Source # (/=) :: HsConDecl -> HsConDecl -> Bool Source #
Pretty HsConDecl Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsConDecl -> Doc prettyPrec :: Int -> HsConDecl -> Doc

data HsBangType Source #

The type of a constructor argument or field, optionally including a strictness annotation.

Constructors

HsBangedTy HsType | Strict component, marked with "`!`".
HsUnBangedTy HsType | Non-strict component.

#### Instances

Instances details

Data HsBangType Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsBangType -> Constr Source #

dataTypeOf :: HsBangType -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsBangType Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsBangType -> ShowS Source # show :: HsBangType -> String Source # showList :: [HsBangType] -> ShowS Source #
Eq HsBangType Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsBangType -> HsBangType -> Bool Source # (/=) :: HsBangType -> HsBangType -> Bool Source #
Pretty HsBangType Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsBangType -> Doc prettyPrec :: Int -> HsBangType -> Doc

data HsMatch Source #

Clauses of a function binding.

Constructors

HsMatch SrcLoc HsName [HsPat] HsRhs [HsDecl] |

#### Instances

Instances details

Data HsMatch Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsMatch -> Constr Source #

dataTypeOf :: HsMatch -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsMatch Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsMatch -> ShowS Source # show :: HsMatch -> String Source # showList :: [HsMatch] -> ShowS Source #
Eq HsMatch Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsMatch -> HsMatch -> Bool Source # (/=) :: HsMatch -> HsMatch -> Bool Source #
Pretty HsMatch Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsMatch -> Doc prettyPrec :: Int -> HsMatch -> Doc

data HsRhs Source #

The right hand side of a function or pattern binding.

Constructors

HsUnGuardedRhs HsExp | Unguarded right hand side (exp).
HsGuardedRhss [HsGuardedRhs] | Guarded right hand side (gdrhs).

#### Instances

Instances details

Data HsRhs Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsRhs -> Constr Source #

dataTypeOf :: HsRhs -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsRhs Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsRhs -> ShowS Source # show :: HsRhs -> String Source # showList :: [HsRhs] -> ShowS Source #
Eq HsRhs Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsRhs -> HsRhs -> Bool Source # (/=) :: HsRhs -> HsRhs -> Bool Source #
Pretty HsRhs Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsRhs -> Doc prettyPrec :: Int -> HsRhs -> Doc

data HsGuardedRhs Source #

A guarded right hand side `|` exp `=` exp. The first expression will be Boolean-valued.

Constructors

HsGuardedRhs SrcLoc HsExp HsExp |

#### Instances

Instances details

Data HsGuardedRhs Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsGuardedRhs -> Constr Source #

dataTypeOf :: HsGuardedRhs -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsGuardedRhs Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsGuardedRhs -> ShowS Source # show :: HsGuardedRhs -> String Source # showList :: [HsGuardedRhs] -> ShowS Source #
Eq HsGuardedRhs Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsGuardedRhs -> HsGuardedRhs -> Bool Source # (/=) :: HsGuardedRhs -> HsGuardedRhs -> Bool Source #
Pretty HsGuardedRhs Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsGuardedRhs -> Doc prettyPrec :: Int -> HsGuardedRhs -> Doc

data HsSafety Source #

Safety level for invoking a foreign entity.

Constructors

HsSafe | Call may generate callbacks.
HsUnsafe | Call will not generate callbacks.

#### Instances

Instances details

Data HsSafety Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsSafety -> Constr Source #

dataTypeOf :: HsSafety -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsSafety Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsSafety -> ShowS Source # show :: HsSafety -> String Source # showList :: [HsSafety] -> ShowS Source #
Eq HsSafety Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsSafety -> HsSafety -> Bool Source # (/=) :: HsSafety -> HsSafety -> Bool Source #
Ord HsSafety Source # |
Instance details Defined in Language.Haskell.Syntax Methods compare :: HsSafety -> HsSafety -> Ordering Source # (<) :: HsSafety -> HsSafety -> Bool Source # (<=) :: HsSafety -> HsSafety -> Bool Source # (>) :: HsSafety -> HsSafety -> Bool Source # (>=) :: HsSafety -> HsSafety -> Bool Source # max :: HsSafety -> HsSafety -> HsSafety Source # min :: HsSafety -> HsSafety -> HsSafety Source #
Pretty HsSafety Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsSafety -> Doc prettyPrec :: Int -> HsSafety -> Doc

# Class Assertions and Contexts

data HsQualType Source #

A type qualified with a context. An unqualified type has an empty context.

Constructors

HsQualType HsContext HsType |

#### Instances

Instances details

Data HsQualType Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsQualType -> Constr Source #

dataTypeOf :: HsQualType -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsQualType Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsQualType -> ShowS Source # show :: HsQualType -> String Source # showList :: [HsQualType] -> ShowS Source #
Eq HsQualType Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsQualType -> HsQualType -> Bool Source # (/=) :: HsQualType -> HsQualType -> Bool Source #
Pretty HsQualType Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsQualType -> Doc prettyPrec :: Int -> HsQualType -> Doc

type HsContext = [HsAsst] Source #

type HsAsst = (HsQName, [HsType]) Source #

Class assertions. In Haskell 98, the argument would be a tyvar, but this definition allows multiple parameters, and allows them to be types.

# Types

data HsType Source #

Haskell types and type constructors.

Constructors

HsTyFun HsType HsType | Function type.
HsTyTuple [HsType] | Tuple type.
HsTyApp HsType HsType | Application of a type constructor.
HsTyVar HsName | Type variable.
HsTyCon HsQName | Named type or type constructor.

#### Instances

Instances details

Data HsType Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsType -> Constr Source #

dataTypeOf :: HsType -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsType Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsType -> ShowS Source # show :: HsType -> String Source # showList :: [HsType] -> ShowS Source #
Eq HsType Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsType -> HsType -> Bool Source # (/=) :: HsType -> HsType -> Bool Source #
Pretty HsType Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsType -> Doc prettyPrec :: Int -> HsType -> Doc

# Expressions

data HsExp Source #

Haskell expressions.

Notes:

- Because it is difficult for parsers to distinguish patterns from expressions, they typically parse them in the same way and then check that they have the appropriate form. Hence the expression type includes some forms that are found only in patterns. After these checks, these constructors should not be used.
- The parser does not take precedence and associativity into account, so it will leave `HsInfixApp`s associated to the left.
- The `Pretty` instance for `HsExp` does not add parentheses in printing.

Constructors

HsVar HsQName | Variable.
HsCon HsQName | Data constructor.
HsLit HsLiteral | Literal constant.
HsInfixApp HsExp HsQOp HsExp | Infix application.
HsApp HsExp HsExp | Ordinary application.
HsNegApp HsExp | Negation expression `-` exp.
HsLambda SrcLoc [HsPat] HsExp | Lambda expression.
HsLet [HsDecl] HsExp | Local declarations with `let`.
HsIf HsExp HsExp HsExp | `If` exp `then` exp `else` exp.
HsCase HsExp [HsAlt] | `Case` exp `of` alts.
HsDo [HsStmt] | `Do`-expression: The last statement in the list should be an expression.
HsTuple [HsExp] | Tuple expression.
HsList [HsExp] | List expression.
HsParen HsExp | Parenthesized expression.
HsLeftSection HsExp HsQOp | Left section `(`exp qop`)`.
HsRightSection HsQOp HsExp | Right section `(`qop exp`)`.
HsRecConstr HsQName [HsFieldUpdate] | Record construction expression.
HsRecUpdate HsExp [HsFieldUpdate] | Record update expression.
HsEnumFrom HsExp | Unbounded arithmetic sequence, incrementing by 1.
HsEnumFromTo HsExp HsExp | Bounded arithmetic sequence, incrementing by 1.
HsEnumFromThen HsExp HsExp | Unbounded arithmetic sequence, with first two elements given.
HsEnumFromThenTo HsExp HsExp HsExp | Bounded arithmetic sequence, with first two elements given.
HsListComp HsExp [HsStmt] | List comprehension.
HsExpTypeSig SrcLoc HsExp HsQualType | Expression type signature.
HsAsPat HsName HsExp | (patterns only)
HsWildCard | (patterns only)
HsIrrPat HsExp | (patterns only)

#### Instances

Instances details

Data HsExp Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsExp -> Constr Source #

dataTypeOf :: HsExp -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsExp Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsExp -> ShowS Source # show :: HsExp -> String Source # showList :: [HsExp] -> ShowS Source #
Eq HsExp Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsExp -> HsExp -> Bool Source # (/=) :: HsExp -> HsExp -> Bool Source #
Pretty HsExp Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsExp -> Doc prettyPrec :: Int -> HsExp -> Doc

data HsStmt Source #

This type represents both stmt in a `do`-expression, and qual in a list comprehension.

Constructors

HsGenerator SrcLoc HsPat HsExp | A generator pat `<-` exp.
HsQualifier HsExp | An exp by itself: in a `do`-expression, an action whose result is discarded; in a list comprehension, a guard expression.
HsLetStmt [HsDecl] | Local bindings.

#### Instances

Instances details

Data HsStmt Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsStmt -> Constr Source #

dataTypeOf :: HsStmt -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsStmt Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsStmt -> ShowS Source # show :: HsStmt -> String Source # showList :: [HsStmt] -> ShowS Source #
Eq HsStmt Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsStmt -> HsStmt -> Bool Source # (/=) :: HsStmt -> HsStmt -> Bool Source #
Pretty HsStmt Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsStmt -> Doc prettyPrec :: Int -> HsStmt -> Doc

data HsFieldUpdate Source #

An fbind in a labeled record construction or update expression.

Constructors

HsFieldUpdate HsQName HsExp |

#### Instances

Instances details

Data HsFieldUpdate Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsFieldUpdate -> Constr Source #

dataTypeOf :: HsFieldUpdate -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsFieldUpdate Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsFieldUpdate -> ShowS Source # show :: HsFieldUpdate -> String Source # showList :: [HsFieldUpdate] -> ShowS Source #
Eq HsFieldUpdate Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsFieldUpdate -> HsFieldUpdate -> Bool Source # (/=) :: HsFieldUpdate -> HsFieldUpdate -> Bool Source #
Pretty HsFieldUpdate Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsFieldUpdate -> Doc prettyPrec :: Int -> HsFieldUpdate -> Doc

data HsAlt Source #

An alt in a `case` expression.

Constructors

HsAlt SrcLoc HsPat HsGuardedAlts [HsDecl] |

#### Instances

Instances details

Data HsAlt Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsAlt -> Constr Source #

dataTypeOf :: HsAlt -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsAlt Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsAlt -> ShowS Source # show :: HsAlt -> String Source # showList :: [HsAlt] -> ShowS Source #
Eq HsAlt Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsAlt -> HsAlt -> Bool Source # (/=) :: HsAlt -> HsAlt -> Bool Source #
Pretty HsAlt Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsAlt -> Doc prettyPrec :: Int -> HsAlt -> Doc

data HsGuardedAlts Source #

Constructors

HsUnGuardedAlt HsExp | `->` exp.
HsGuardedAlts [HsGuardedAlt] | gdpat.

#### Instances

Instances details

Data HsGuardedAlts Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsGuardedAlts -> Constr Source #

dataTypeOf :: HsGuardedAlts -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsGuardedAlts Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsGuardedAlts -> ShowS Source # show :: HsGuardedAlts -> String Source # showList :: [HsGuardedAlts] -> ShowS Source #
Eq HsGuardedAlts Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsGuardedAlts -> HsGuardedAlts -> Bool Source # (/=) :: HsGuardedAlts -> HsGuardedAlts -> Bool Source #
Pretty HsGuardedAlts Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsGuardedAlts -> Doc prettyPrec :: Int -> HsGuardedAlts -> Doc

data HsGuardedAlt Source #

A guarded alternative `|` exp `->` exp. The first expression will be Boolean-valued.

Constructors

HsGuardedAlt SrcLoc HsExp HsExp |

#### Instances

Instances details

Data HsGuardedAlt Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsGuardedAlt -> Constr Source #

dataTypeOf :: HsGuardedAlt -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsGuardedAlt Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsGuardedAlt -> ShowS Source # show :: HsGuardedAlt -> String Source # showList :: [HsGuardedAlt] -> ShowS Source #
Eq HsGuardedAlt Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsGuardedAlt -> HsGuardedAlt -> Bool Source # (/=) :: HsGuardedAlt -> HsGuardedAlt -> Bool Source #
Pretty HsGuardedAlt Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsGuardedAlt -> Doc prettyPrec :: Int -> HsGuardedAlt -> Doc

# Patterns

data HsPat Source #

A pattern, to be matched against a value.

Constructors

HsPVar HsName | Variable.
HsPLit HsLiteral | Literal constant.
HsPNeg HsPat | Negated pattern.
HsPInfixApp HsPat HsQName HsPat | Pattern with infix data constructor.
HsPApp HsQName [HsPat] | Data constructor and argument patterns.
HsPTuple [HsPat] | Tuple pattern.
HsPList [HsPat] | List pattern.
HsPParen HsPat | Parenthesized pattern.
HsPRec HsQName [HsPatField] | Labelled pattern.
HsPAsPat HsName HsPat | `@`-Pattern.
HsPWildCard | Wildcard pattern (`_`).
HsPIrrPat HsPat | Irrefutable pattern (`~`).

#### Instances

Instances details

Data HsPat Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsPat -> Constr Source #

dataTypeOf :: HsPat -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsPat Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsPat -> ShowS Source # show :: HsPat -> String Source # showList :: [HsPat] -> ShowS Source #
Eq HsPat Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsPat -> HsPat -> Bool Source # (/=) :: HsPat -> HsPat -> Bool Source #
Pretty HsPat Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsPat -> Doc prettyPrec :: Int -> HsPat -> Doc

data HsPatField Source #

An fpat in a labeled record pattern.

Constructors

HsPFieldPat HsQName HsPat |

#### Instances

Instances details

Data HsPatField Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsPatField -> Constr Source #

dataTypeOf :: HsPatField -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsPatField Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsPatField -> ShowS Source # show :: HsPatField -> String Source # showList :: [HsPatField] -> ShowS Source #
Eq HsPatField Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsPatField -> HsPatField -> Bool Source # (/=) :: HsPatField -> HsPatField -> Bool Source #
Pretty HsPatField Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsPatField -> Doc prettyPrec :: Int -> HsPatField -> Doc

# Literals

data HsLiteral Source #

literal. Values of this type hold the abstract value of the literal, not the precise string representation used. For example, `10`, `0o12` and `0xa` have the same representation.

Constructors

HsChar Char | Character literal.
HsString String | String literal.
HsInt Integer | Integer literal.
HsFrac Rational | Floating point literal.
HsCharPrim Char | GHC unboxed character literal.
HsStringPrim String | GHC unboxed string literal.
HsIntPrim Integer | GHC unboxed integer literal.
HsFloatPrim Rational | GHC unboxed float literal.
HsDoublePrim Rational | GHC unboxed double literal.

#### Instances

Instances details

Data HsLiteral Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsLiteral -> Constr Source #

dataTypeOf :: HsLiteral -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsLiteral Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsLiteral -> ShowS Source # show :: HsLiteral -> String Source # showList :: [HsLiteral] -> ShowS Source #
Eq HsLiteral Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsLiteral -> HsLiteral -> Bool Source # (/=) :: HsLiteral -> HsLiteral -> Bool Source #
Pretty HsLiteral Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsLiteral -> Doc prettyPrec :: Int -> HsLiteral -> Doc

# Variables, Constructors and Operators

newtype Module Source #

The name of a Haskell module.

Constructors

Module String |

#### Instances

Instances details

Data Module Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: Module -> Constr Source #

dataTypeOf :: Module -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show Module Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> Module -> ShowS Source # show :: Module -> String Source # showList :: [Module] -> ShowS Source #
Eq Module Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: Module -> Module -> Bool Source # (/=) :: Module -> Module -> Bool Source #
Ord Module Source # |
Instance details Defined in Language.Haskell.Syntax Methods compare :: Module -> Module -> Ordering Source # (<) :: Module -> Module -> Bool Source # (<=) :: Module -> Module -> Bool Source # (>) :: Module -> Module -> Bool Source # (>=) :: Module -> Module -> Bool Source # max :: Module -> Module -> Module Source # min :: Module -> Module -> Module Source #
Pretty Module Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: Module -> Doc prettyPrec :: Int -> Module -> Doc

data HsQName Source #

This type is used to represent qualified variables, and also qualified constructors.

Constructors

Qual Module HsName | Name qualified with a module name.
UnQual HsName | Unqualified name.
Special HsSpecialCon | Built-in constructor with special syntax.

#### Instances

Instances details

Data HsQName Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsQName -> Constr Source #

dataTypeOf :: HsQName -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsQName Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsQName -> ShowS Source # show :: HsQName -> String Source # showList :: [HsQName] -> ShowS Source #
Eq HsQName Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsQName -> HsQName -> Bool Source # (/=) :: HsQName -> HsQName -> Bool Source #
Ord HsQName Source # |
Instance details Defined in Language.Haskell.Syntax Methods compare :: HsQName -> HsQName -> Ordering Source # (<) :: HsQName -> HsQName -> Bool Source # (<=) :: HsQName -> HsQName -> Bool Source # (>) :: HsQName -> HsQName -> Bool Source # (>=) :: HsQName -> HsQName -> Bool Source # max :: HsQName -> HsQName -> HsQName Source # min :: HsQName -> HsQName -> HsQName Source #
Pretty HsQName Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsQName -> Doc prettyPrec :: Int -> HsQName -> Doc

data HsName Source #

This type is used to represent variables, and also constructors.

Constructors

HsIdent String | varid or conid.
HsSymbol String | varsym or consym.

#### Instances

Instances details

Data HsName Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsName -> Constr Source #

dataTypeOf :: HsName -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsName Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsName -> ShowS Source # show :: HsName -> String Source # showList :: [HsName] -> ShowS Source #
Eq HsName Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsName -> HsName -> Bool Source # (/=) :: HsName -> HsName -> Bool Source #
Ord HsName Source # |
Instance details Defined in Language.Haskell.Syntax Methods compare :: HsName -> HsName -> Ordering Source # (<) :: HsName -> HsName -> Bool Source # (<=) :: HsName -> HsName -> Bool Source # (>) :: HsName -> HsName -> Bool Source # (>=) :: HsName -> HsName -> Bool Source # max :: HsName -> HsName -> HsName Source # min :: HsName -> HsName -> HsName Source #
Pretty HsName Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsName -> Doc prettyPrec :: Int -> HsName -> Doc

data HsQOp Source #

Possibly qualified infix operators (qop), appearing in expressions.

Constructors

HsQVarOp HsQName | Variable operator (qvarop).
HsQConOp HsQName | Constructor operator (qconop).

#### Instances

Instances details

Data HsQOp Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsQOp -> Constr Source #

dataTypeOf :: HsQOp -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsQOp Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsQOp -> ShowS Source # show :: HsQOp -> String Source # showList :: [HsQOp] -> ShowS Source #
Eq HsQOp Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsQOp -> HsQOp -> Bool Source # (/=) :: HsQOp -> HsQOp -> Bool Source #
Ord HsQOp Source # |
Instance details Defined in Language.Haskell.Syntax Methods compare :: HsQOp -> HsQOp -> Ordering Source # (<) :: HsQOp -> HsQOp -> Bool Source # (<=) :: HsQOp -> HsQOp -> Bool Source # (>) :: HsQOp -> HsQOp -> Bool Source # (>=) :: HsQOp -> HsQOp -> Bool Source # max :: HsQOp -> HsQOp -> HsQOp Source # min :: HsQOp -> HsQOp -> HsQOp Source #
Pretty HsQOp Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsQOp -> Doc prettyPrec :: Int -> HsQOp -> Doc

data HsOp Source #

Operators, appearing in `infix` declarations.

Constructors

HsVarOp HsName | Variable operator (varop).
HsConOp HsName | Constructor operator (conop).

#### Instances

Instances details

Data HsOp Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsOp -> Constr Source #

dataTypeOf :: HsOp -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsOp Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsOp -> ShowS Source # show :: HsOp -> String Source # showList :: [HsOp] -> ShowS Source #
Eq HsOp Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsOp -> HsOp -> Bool Source # (/=) :: HsOp -> HsOp -> Bool Source #
Ord HsOp Source # |
Instance details Defined in Language.Haskell.Syntax Methods compare :: HsOp -> HsOp -> Ordering Source # (<) :: HsOp -> HsOp -> Bool Source # (<=) :: HsOp -> HsOp -> Bool Source # (>) :: HsOp -> HsOp -> Bool Source # (>=) :: HsOp -> HsOp -> Bool Source # max :: HsOp -> HsOp -> HsOp Source # min :: HsOp -> HsOp -> HsOp Source #
Pretty HsOp Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsOp -> Doc prettyPrec :: Int -> HsOp -> Doc

data HsSpecialCon Source #

Constructors with special syntax. These names are never qualified, and always refer to builtin type or data constructors.

Constructors

HsUnitCon | Unit type and data constructor `()`.
HsListCon | List type constructor `[]`.
HsFunCon | Function type constructor `->`.
HsTupleCon Int | n-ary tuple type and data constructors `(,)` etc.
HsCons | List data constructor `(:)`.

#### Instances

Instances details

Data HsSpecialCon Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsSpecialCon -> Constr Source #

dataTypeOf :: HsSpecialCon -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsSpecialCon Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsSpecialCon -> ShowS Source # show :: HsSpecialCon -> String Source # showList :: [HsSpecialCon] -> ShowS Source #
Eq HsSpecialCon Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsSpecialCon -> HsSpecialCon -> Bool Source # (/=) :: HsSpecialCon -> HsSpecialCon -> Bool Source #
Ord HsSpecialCon Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

compare :: HsSpecialCon -> HsSpecialCon -> Ordering Source #

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

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

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

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

max :: HsSpecialCon -> HsSpecialCon -> HsSpecialCon Source #

min :: HsSpecialCon -> HsSpecialCon -> HsSpecialCon Source #

data HsCName Source #

A name (cname) of a component of a class or data type in an `import` or export specification.

Constructors

HsVarName HsName | Name of a method or field.
HsConName HsName | Name of a data constructor.

#### Instances

Instances details

Data HsCName Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: HsCName -> Constr Source #

dataTypeOf :: HsCName -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show HsCName Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> HsCName -> ShowS Source # show :: HsCName -> String Source # showList :: [HsCName] -> ShowS Source #
Eq HsCName Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: HsCName -> HsCName -> Bool Source # (/=) :: HsCName -> HsCName -> Bool Source #
Ord HsCName Source # |
Instance details Defined in Language.Haskell.Syntax Methods compare :: HsCName -> HsCName -> Ordering Source # (<) :: HsCName -> HsCName -> Bool Source # (<=) :: HsCName -> HsCName -> Bool Source # (>) :: HsCName -> HsCName -> Bool Source # (>=) :: HsCName -> HsCName -> Bool Source # max :: HsCName -> HsCName -> HsCName Source # min :: HsCName -> HsCName -> HsCName Source #
Pretty HsCName Source # |
Instance details Defined in Language.Haskell.Pretty Methods pretty :: HsCName -> Doc prettyPrec :: Int -> HsCName -> Doc

# Builtin names

## Modules

prelude_mod :: Module Source #

main_mod :: Module Source #

## Main function of a program

main_name :: HsName Source #

## Constructors

unit_con_name :: HsQName Source #

tuple_con_name :: Int -> HsQName Source #

list_cons_name :: HsQName Source #

unit_con :: HsExp Source #

tuple_con :: Int -> HsExp Source #

## Type constructors

unit_tycon_name :: HsQName Source #

fun_tycon_name :: HsQName Source #

list_tycon_name :: HsQName Source #

tuple_tycon_name :: Int -> HsQName Source #

unit_tycon :: HsType Source #

fun_tycon :: HsType Source #

list_tycon :: HsType Source #

tuple_tycon :: Int -> HsType Source #

# Source coordinates

data SrcLoc Source #

A position in the source.

Constructors

SrcLoc |

Fields

- srcFilename :: String
- srcLine :: Int
- srcColumn :: Int

#### Instances

Instances details

Data SrcLoc Source # |

Instance details

Defined in Language.Haskell.Syntax

Methods

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

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

toConstr :: SrcLoc -> Constr Source #

dataTypeOf :: SrcLoc -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show SrcLoc Source # |
Instance details Defined in Language.Haskell.Syntax Methods showsPrec :: Int -> SrcLoc -> ShowS Source # show :: SrcLoc -> String Source # showList :: [SrcLoc] -> ShowS Source #
Eq SrcLoc Source # |
Instance details Defined in Language.Haskell.Syntax Methods (==) :: SrcLoc -> SrcLoc -> Bool Source # (/=) :: SrcLoc -> SrcLoc -> Bool Source #
Ord SrcLoc Source # |
Instance details Defined in Language.Haskell.Syntax Methods compare :: SrcLoc -> SrcLoc -> Ordering Source # (<) :: SrcLoc -> SrcLoc -> Bool Source # (<=) :: SrcLoc -> SrcLoc -> Bool Source # (>) :: SrcLoc -> SrcLoc -> Bool Source # (>=) :: SrcLoc -> SrcLoc -> Bool Source # max :: SrcLoc -> SrcLoc -> SrcLoc Source # min :: SrcLoc -> SrcLoc -> SrcLoc Source #