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

Copyright(c) The GHC Team 1997-2000
LicenseBSD-style (see the file libraries/base/LICENSE)
Maintainerlibraries@haskell.org
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell98

Language.Haskell.Syntax

Contents

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

This module has been changed so that show is a real show. For GHC, we also derive Typeable and Data for all types.

Synopsis

Modules

data HsModule Source #

A Haskell source module.

Instances
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 :: (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

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
Eq HsExportSpec Source # 
Instance details

Defined in Language.Haskell.Syntax

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 :: (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

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

Instances
Eq HsImportDecl Source # 
Instance details

Defined in Language.Haskell.Syntax

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 :: (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

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
Eq HsImportSpec Source # 
Instance details

Defined in Language.Haskell.Syntax

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 :: (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

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
Eq HsAssoc Source # 
Instance details

Defined in Language.Haskell.Syntax

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 :: (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

Pretty HsAssoc Source # 
Instance details

Defined in Language.Haskell.Pretty

Methods

pretty :: HsAssoc -> Doc

prettyPrec :: Int -> HsAssoc -> Doc

Declarations

data HsDecl Source #

Instances
Eq HsDecl Source # 
Instance details

Defined in Language.Haskell.Syntax

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 :: (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

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
Eq HsConDecl Source # 
Instance details

Defined in Language.Haskell.Syntax

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 :: (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

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
Eq HsBangType Source # 
Instance details

Defined in Language.Haskell.Syntax

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 :: (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

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.

Instances
Eq HsMatch Source # 
Instance details

Defined in Language.Haskell.Syntax

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 :: (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

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
Eq HsRhs Source # 
Instance details

Defined in Language.Haskell.Syntax

Methods

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

(/=) :: HsRhs -> HsRhs -> Bool Source #

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 :: (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

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.

Instances
Eq HsGuardedRhs Source # 
Instance details

Defined in Language.Haskell.Syntax

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 :: (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

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
Eq HsSafety Source # 
Instance details

Defined in Language.Haskell.Syntax

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 :: (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 #

Ord HsSafety Source # 
Instance details

Defined in Language.Haskell.Syntax

Show HsSafety Source # 
Instance details

Defined in Language.Haskell.Syntax

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.

Instances
Eq HsQualType Source # 
Instance details

Defined in Language.Haskell.Syntax

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 :: (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

Pretty HsQualType Source # 
Instance details

Defined in Language.Haskell.Pretty

Methods

pretty :: HsQualType -> Doc

prettyPrec :: Int -> HsQualType -> Doc

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
Eq HsType Source # 
Instance details

Defined in Language.Haskell.Syntax

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 :: (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

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 HsInfixApps 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
Eq HsExp Source # 
Instance details

Defined in Language.Haskell.Syntax

Methods

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

(/=) :: HsExp -> HsExp -> Bool Source #

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 :: (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

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
Eq HsStmt Source # 
Instance details

Defined in Language.Haskell.Syntax

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 :: (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

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.

Instances
Eq HsFieldUpdate Source # 
Instance details

Defined in Language.Haskell.Syntax

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 :: (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

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.

Instances
Eq HsAlt Source # 
Instance details

Defined in Language.Haskell.Syntax

Methods

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

(/=) :: HsAlt -> HsAlt -> Bool Source #

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 :: (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

Pretty HsAlt Source # 
Instance details

Defined in Language.Haskell.Pretty

Methods

pretty :: HsAlt -> Doc

prettyPrec :: Int -> HsAlt -> Doc

data HsGuardedAlts Source #

Instances
Eq HsGuardedAlts Source # 
Instance details

Defined in Language.Haskell.Syntax

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 :: (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

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.

Instances
Eq HsGuardedAlt Source # 
Instance details

Defined in Language.Haskell.Syntax

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 :: (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

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
Eq HsPat Source # 
Instance details

Defined in Language.Haskell.Syntax

Methods

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

(/=) :: HsPat -> HsPat -> Bool Source #

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 :: (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

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
Eq HsPatField Source # 
Instance details

Defined in Language.Haskell.Syntax

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 :: (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

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
Eq HsLiteral Source # 
Instance details

Defined in Language.Haskell.Syntax

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 :: (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

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
Eq Module Source # 
Instance details

Defined in Language.Haskell.Syntax

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 :: (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 #

Ord Module Source # 
Instance details

Defined in Language.Haskell.Syntax

Show Module Source # 
Instance details

Defined in Language.Haskell.Syntax

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
Eq HsQName Source # 
Instance details

Defined in Language.Haskell.Syntax

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 :: (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 #

Ord HsQName Source # 
Instance details

Defined in Language.Haskell.Syntax

Show HsQName Source # 
Instance details

Defined in Language.Haskell.Syntax

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
Eq HsName Source # 
Instance details

Defined in Language.Haskell.Syntax

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 :: (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 #

Ord HsName Source # 
Instance details

Defined in Language.Haskell.Syntax

Show HsName Source # 
Instance details

Defined in Language.Haskell.Syntax

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
Eq HsQOp Source # 
Instance details

Defined in Language.Haskell.Syntax

Methods

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

(/=) :: HsQOp -> HsQOp -> Bool Source #

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 :: (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 #

Ord HsQOp Source # 
Instance details

Defined in Language.Haskell.Syntax

Show HsQOp Source # 
Instance details

Defined in Language.Haskell.Syntax

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
Eq HsOp Source # 
Instance details

Defined in Language.Haskell.Syntax

Methods

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

(/=) :: HsOp -> HsOp -> Bool Source #

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 :: (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 #

Ord HsOp Source # 
Instance details

Defined in Language.Haskell.Syntax

Show HsOp Source # 
Instance details

Defined in Language.Haskell.Syntax

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
Eq HsSpecialCon Source # 
Instance details

Defined in Language.Haskell.Syntax

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 :: (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 #

Ord HsSpecialCon Source # 
Instance details

Defined in Language.Haskell.Syntax

Show HsSpecialCon Source # 
Instance details

Defined in Language.Haskell.Syntax

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
Eq HsCName Source # 
Instance details

Defined in Language.Haskell.Syntax

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 :: (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 #

Ord HsCName Source # 
Instance details

Defined in Language.Haskell.Syntax

Show HsCName Source # 
Instance details

Defined in Language.Haskell.Syntax

Pretty HsCName Source # 
Instance details

Defined in Language.Haskell.Pretty

Methods

pretty :: HsCName -> Doc

prettyPrec :: Int -> HsCName -> Doc

Builtin names

Modules

Main function of a program

Constructors

Type constructors

Source coordinates

data SrcLoc Source #

A position in the source.

Constructors

SrcLoc 
Instances
Eq SrcLoc Source # 
Instance details

Defined in Language.Haskell.Syntax

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 :: (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 #

Ord SrcLoc Source # 
Instance details

Defined in Language.Haskell.Syntax

Show SrcLoc Source # 
Instance details

Defined in Language.Haskell.Syntax