ghc-8.2.1: The GHC API

Safe HaskellNone
LanguageHaskell2010

HsExpr

Contents

Description

Abstract Haskell syntax for expressions.

Synopsis

Expressions proper

type LHsExpr id Source #

Arguments

 = Located (HsExpr id)

May have AnnKeywordId : AnnComma when in a list

Located Haskell Expression

type PostTcExpr = HsExpr Id Source #

Post-Type checking Expression

PostTcExpr is an evidence expression attached to the syntax tree by the type checker (c.f. postTcType).

type PostTcTable = [(Name, PostTcExpr)] Source #

Post-Type checking Table

We use a PostTcTable where there are a bunch of pieces of evidence, more than is convenient to keep individually.

data SyntaxExpr id Source #

Syntax Expression

SyntaxExpr is like PostTcExpr, but it's filled in a little earlier, by the renamer. It's used for rebindable syntax.

E.g. (>>=) is filled in before the renamer by the appropriate Name for (>>=), and then instantiated by the type checker with its type args etc

This should desugar to

syn_res_wrap $ syn_expr (syn_arg_wraps[0] arg0)
                        (syn_arg_wraps[1] arg1) ...

where the actual arguments come from elsewhere in the AST. This could be defined using PostRn and PostTc and such, but it's harder to get it all to work out that way. (noSyntaxExpr is hard to write, for example.)

Instances

DataId id => Data (SyntaxExpr id) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SyntaxExpr id -> c (SyntaxExpr id) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (SyntaxExpr id) #

toConstr :: SyntaxExpr id -> Constr #

dataTypeOf :: SyntaxExpr id -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (SyntaxExpr id)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (SyntaxExpr id)) #

gmapT :: (forall b. Data b => b -> b) -> SyntaxExpr id -> SyntaxExpr id #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SyntaxExpr id -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SyntaxExpr id -> r #

gmapQ :: (forall d. Data d => d -> u) -> SyntaxExpr id -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SyntaxExpr id -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SyntaxExpr id -> m (SyntaxExpr id) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SyntaxExpr id -> m (SyntaxExpr id) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SyntaxExpr id -> m (SyntaxExpr id) #

OutputableBndrId id => Outputable (SyntaxExpr id) Source # 

noExpr :: HsExpr id Source #

This is used for rebindable-syntax pieces that are too polymorphic for tcSyntaxOp (trS_fmap and the mzip in ParStmt)

mkRnSyntaxExpr :: Name -> SyntaxExpr Name Source #

Make a 'SyntaxExpr Name' (the "rn" is because this is used in the renamer), missing its HsWrappers.

type CmdSyntaxTable id = [(Name, HsExpr id)] Source #

Command Syntax Table (for Arrow syntax)

data UnboundVar Source #

An unbound variable; used for treating out-of-scope variables as expression holes

Constructors

OutOfScope OccName GlobalRdrEnv

An (unqualified) out-of-scope variable, together with the GlobalRdrEnv with respect to which it is unbound

TrueExprHole OccName

A "true" expression hole (_ or _x)

Instances

Data UnboundVar Source # 

Methods

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

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

toConstr :: UnboundVar -> Constr #

dataTypeOf :: UnboundVar -> DataType #

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

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

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

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

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

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

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

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

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

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

Outputable UnboundVar Source # 

data HsExpr id Source #

A Haskell expression.

Constructors

HsVar (Located id)

Variable

HsUnboundVar UnboundVar

Unbound variable; also used for "holes" (_ or _x). Turned from HsVar to HsUnboundVar by the renamer, when it finds an out-of-scope variable or hole. Turned into HsVar by type checker, to support deferred type errors.

HsConLikeOut ConLike

After typechecker only; must be different HsVar for pretty printing

HsRecFld (AmbiguousFieldOcc id)

Variable pointing to record selector Not in use after typechecking

HsOverLabel (Maybe id) FastString

Overloaded label (Note [Overloaded labels] in GHC.OverloadedLabels) Just id means RebindableSyntax is in use, and gives the id of the in-scope fromLabel. NB: Not in use after typechecking

HsIPVar HsIPName

Implicit parameter (not in use after typechecking)

HsOverLit (HsOverLit id)

Overloaded literals

HsLit HsLit

Simple (non-overloaded) literals

HsLam (MatchGroup id (LHsExpr id))

Lambda abstraction. Currently always a single match

HsLamCase (MatchGroup id (LHsExpr id))

Lambda-case

HsApp (LHsExpr id) (LHsExpr id)

Application

HsAppType (LHsExpr id) (LHsWcType id)

Visible type application

Explicit type argument; e.g f @Int x y NB: Has wildcards, but no implicit quantification

HsAppTypeOut (LHsExpr id) (LHsWcType Name) 
OpApp (LHsExpr id) (LHsExpr id) (PostRn id Fixity) (LHsExpr id)

Operator applications: NB Bracketed ops such as (+) come out as Vars.

NegApp (LHsExpr id) (SyntaxExpr id)

Negation operator. Contains the negated expression and the name of negate

HsPar (LHsExpr id)

Parenthesised expr; see Note [Parens in HsSyn]

SectionL (LHsExpr id) (LHsExpr id) 
SectionR (LHsExpr id) (LHsExpr id) 
ExplicitTuple [LHsTupArg id] Boxity

Used for explicit tuples and sections thereof

ExplicitSum ConTag Arity (LHsExpr id) (PostTc id [Type])

Used for unboxed sum types

There will be multiple AnnVbar, (1 - alternative) before the expression, (arity - alternative) after it

HsCase (LHsExpr id) (MatchGroup id (LHsExpr id))
HsIf (Maybe (SyntaxExpr id)) (LHsExpr id) (LHsExpr id) (LHsExpr id)
HsMultiIf (PostTc id Type) [LGRHS id (LHsExpr id)]

Multi-way if

HsLet (LHsLocalBinds id) (LHsExpr id)

let(rec)

HsDo (HsStmtContext Name) (Located [ExprLStmt id]) (PostTc id Type)
ExplicitList (PostTc id Type) (Maybe (SyntaxExpr id)) [LHsExpr id]

Syntactic list: [a,b,c,...]

ExplicitPArr (PostTc id Type) [LHsExpr id]

Syntactic parallel array: [:e1, ..., en:]

RecordCon

Record construction

RecordUpd

Record update

ExprWithTySig (LHsExpr id) (LHsSigWcType id)

Expression with an explicit type signature. e :: type

ExprWithTySigOut (LHsExpr id) (LHsSigWcType Name) 
ArithSeq PostTcExpr (Maybe (SyntaxExpr id)) (ArithSeqInfo id)

Arithmetic sequence

PArrSeq PostTcExpr (ArithSeqInfo id)

Arithmetic sequence for parallel array

[:e1..e2:] or [:e1, e2..e3:]
HsSCC SourceText StringLiteral (LHsExpr id)
HsCoreAnn SourceText StringLiteral (LHsExpr id)
HsBracket (HsBracket id)
HsRnBracketOut (HsBracket Name) [PendingRnSplice] 
HsTcBracketOut (HsBracket Name) [PendingTcSplice] 
HsSpliceE (HsSplice id)
HsProc (LPat id) (LHsCmdTop id)

proc notation for Arrows

HsStatic (PostRn id NameSet) (LHsExpr id)
HsArrApp (LHsExpr id) (LHsExpr id) (PostTc id Type) HsArrAppType Bool
HsArrForm (LHsExpr id) (Maybe Fixity) [LHsCmdTop id]
HsTick (Tickish id) (LHsExpr id) 
HsBinTick Int Int (LHsExpr id) 
HsTickPragma SourceText (StringLiteral, (Int, Int), (Int, Int)) ((SourceText, SourceText), (SourceText, SourceText)) (LHsExpr id)
EWildPat 
EAsPat (Located id) (LHsExpr id)
EViewPat (LHsExpr id) (LHsExpr id)
ELazyPat (LHsExpr id)
HsWrap HsWrapper (HsExpr id) 

Instances

DataId id => Data (HsExpr id) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsExpr id -> c (HsExpr id) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsExpr id) #

toConstr :: HsExpr id -> Constr #

dataTypeOf :: HsExpr id -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (HsExpr id)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsExpr id)) #

gmapT :: (forall b. Data b => b -> b) -> HsExpr id -> HsExpr id #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsExpr id -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsExpr id -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsExpr id -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsExpr id -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsExpr id -> m (HsExpr id) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsExpr id -> m (HsExpr id) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsExpr id -> m (HsExpr id) #

OutputableBndrId id => Outputable (HsExpr id) Source # 

Methods

ppr :: HsExpr id -> SDoc Source #

pprPrec :: Rational -> HsExpr id -> SDoc Source #

type LHsTupArg id = Located (HsTupArg id) Source #

Located Haskell Tuple Argument

HsTupArg is used for tuple sections (,a,) is represented by ExplicitTuple [Missing ty1, Present a, Missing ty3] Which in turn stands for (x:ty1 y:ty2. (x,a,y))

data HsTupArg id Source #

Haskell Tuple Argument

Constructors

Present (LHsExpr id)

The argument

Missing (PostTc id Type)

The argument is missing, but this is its type

Instances

DataId id => Data (HsTupArg id) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsTupArg id -> c (HsTupArg id) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsTupArg id) #

toConstr :: HsTupArg id -> Constr #

dataTypeOf :: HsTupArg id -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (HsTupArg id)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsTupArg id)) #

gmapT :: (forall b. Data b => b -> b) -> HsTupArg id -> HsTupArg id #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsTupArg id -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsTupArg id -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsTupArg id -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsTupArg id -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsTupArg id -> m (HsTupArg id) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTupArg id -> m (HsTupArg id) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTupArg id -> m (HsTupArg id) #

ppr_expr :: forall id. OutputableBndrId id => HsExpr id -> SDoc Source #

data LHsWcTypeX Source #

Located Haskell Wildcard Type Expression

Constructors

OutputableBndrId id => LHsWcTypeX (LHsWcType id) 

type LHsCmd id = Located (HsCmd id) Source #

Located Haskell Command (for arrow syntax)

data HsCmd id Source #

Haskell Command (e.g. a "statement" in an Arrow proc block)

Instances

DataId id => Data (HsCmd id) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsCmd id -> c (HsCmd id) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsCmd id) #

toConstr :: HsCmd id -> Constr #

dataTypeOf :: HsCmd id -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (HsCmd id)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsCmd id)) #

gmapT :: (forall b. Data b => b -> b) -> HsCmd id -> HsCmd id #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsCmd id -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsCmd id -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsCmd id -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsCmd id -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsCmd id -> m (HsCmd id) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsCmd id -> m (HsCmd id) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsCmd id -> m (HsCmd id) #

OutputableBndrId id => Outputable (HsCmd id) Source # 

Methods

ppr :: HsCmd id -> SDoc Source #

pprPrec :: Rational -> HsCmd id -> SDoc Source #

data HsArrAppType Source #

Haskell Array Application Type

Instances

Data HsArrAppType Source # 

Methods

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

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

toConstr :: HsArrAppType -> Constr #

dataTypeOf :: HsArrAppType -> DataType #

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

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

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

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

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

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

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

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

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

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

type LHsCmdTop id = Located (HsCmdTop id) Source #

Top-level command, introducing a new arrow. This may occur inside a proc (where the stack is empty) or as an argument of a command-forming operator.

Located Haskell Top-level Command

data HsCmdTop id Source #

Haskell Top-level Command

Constructors

HsCmdTop (LHsCmd id) (PostTc id Type) (PostTc id Type) (CmdSyntaxTable id) 

Instances

DataId id => Data (HsCmdTop id) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsCmdTop id -> c (HsCmdTop id) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsCmdTop id) #

toConstr :: HsCmdTop id -> Constr #

dataTypeOf :: HsCmdTop id -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (HsCmdTop id)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsCmdTop id)) #

gmapT :: (forall b. Data b => b -> b) -> HsCmdTop id -> HsCmdTop id #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsCmdTop id -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsCmdTop id -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsCmdTop id -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsCmdTop id -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsCmdTop id -> m (HsCmdTop id) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsCmdTop id -> m (HsCmdTop id) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsCmdTop id -> m (HsCmdTop id) #

OutputableBndrId id => Outputable (HsCmdTop id) Source # 

ppr_cmd :: forall id. OutputableBndrId id => HsCmd id -> SDoc Source #

type HsRecordBinds id = HsRecFields id (LHsExpr id) Source #

Haskell Record Bindings

data MatchGroup id body Source #

Constructors

MG 

Fields

Instances

(Data body, DataId id) => Data (MatchGroup id body) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MatchGroup id body -> c (MatchGroup id body) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (MatchGroup id body) #

toConstr :: MatchGroup id body -> Constr #

dataTypeOf :: MatchGroup id body -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (MatchGroup id body)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (MatchGroup id body)) #

gmapT :: (forall b. Data b => b -> b) -> MatchGroup id body -> MatchGroup id body #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroup id body -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroup id body -> r #

gmapQ :: (forall d. Data d => d -> u) -> MatchGroup id body -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> MatchGroup id body -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MatchGroup id body -> m (MatchGroup id body) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroup id body -> m (MatchGroup id body) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroup id body -> m (MatchGroup id body) #

type LMatch id body = Located (Match id body) Source #

Located Match

May have AnnKeywordId : AnnSemi when in a list

data Match id body Source #

Constructors

Match 

Fields

Instances

(Data body, DataId id) => Data (Match id body) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Match id body -> c (Match id body) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Match id body) #

toConstr :: Match id body -> Constr #

dataTypeOf :: Match id body -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Match id body)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Match id body)) #

gmapT :: (forall b. Data b => b -> b) -> Match id body -> Match id body #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Match id body -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Match id body -> r #

gmapQ :: (forall d. Data d => d -> u) -> Match id body -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Match id body -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Match id body -> m (Match id body) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Match id body -> m (Match id body) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Match id body -> m (Match id body) #

(OutputableBndrId idR, Outputable body) => Outputable (Match idR body) Source # 

Methods

ppr :: Match idR body -> SDoc Source #

pprPrec :: Rational -> Match idR body -> SDoc Source #

isSingletonMatchGroup :: [LMatch id body] -> Bool Source #

Is there only one RHS in this list of matches?

hsLMatchPats :: LMatch id body -> [LPat id] Source #

data GRHSs id body Source #

Guarded Right-Hand Sides

GRHSs are used both for pattern bindings and for Matches

Constructors

GRHSs 

Fields

Instances

(Data body, DataId id) => Data (GRHSs id body) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GRHSs id body -> c (GRHSs id body) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GRHSs id body) #

toConstr :: GRHSs id body -> Constr #

dataTypeOf :: GRHSs id body -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (GRHSs id body)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GRHSs id body)) #

gmapT :: (forall b. Data b => b -> b) -> GRHSs id body -> GRHSs id body #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GRHSs id body -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GRHSs id body -> r #

gmapQ :: (forall d. Data d => d -> u) -> GRHSs id body -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GRHSs id body -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GRHSs id body -> m (GRHSs id body) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHSs id body -> m (GRHSs id body) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHSs id body -> m (GRHSs id body) #

type LGRHS id body = Located (GRHS id body) Source #

Located Guarded Right-Hand Side

data GRHS id body Source #

Guarded Right Hand Side.

Constructors

GRHS [GuardLStmt id] body 

Instances

(Data body, DataId id) => Data (GRHS id body) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GRHS id body -> c (GRHS id body) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GRHS id body) #

toConstr :: GRHS id body -> Constr #

dataTypeOf :: GRHS id body -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (GRHS id body)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GRHS id body)) #

gmapT :: (forall b. Data b => b -> b) -> GRHS id body -> GRHS id body #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GRHS id body -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GRHS id body -> r #

gmapQ :: (forall d. Data d => d -> u) -> GRHS id body -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GRHS id body -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GRHS id body -> m (GRHS id body) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHS id body -> m (GRHS id body) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHS id body -> m (GRHS id body) #

pprPatBind :: forall bndr id body. (OutputableBndrId bndr, OutputableBndrId id, Outputable body) => LPat bndr -> GRHSs id body -> SDoc Source #

pprMatch :: (OutputableBndrId idR, Outputable body) => Match idR body -> SDoc Source #

pprGRHSs :: (OutputableBndrId idR, Outputable body) => HsMatchContext idL -> GRHSs idR body -> SDoc Source #

pprGRHS :: (OutputableBndrId idR, Outputable body) => HsMatchContext idL -> GRHS idR body -> SDoc Source #

pp_rhs :: Outputable body => HsMatchContext idL -> body -> SDoc Source #

type LStmt id body = Located (StmtLR id id body) Source #

Located do block Statement

type LStmtLR idL idR body = Located (StmtLR idL idR body) Source #

Located Statement with separate Left and Right id's

type Stmt id body = StmtLR id id body Source #

do block Statement

type CmdLStmt id = LStmt id (LHsCmd id) Source #

Command Located Statement

type CmdStmt id = Stmt id (LHsCmd id) Source #

Command Statement

type ExprLStmt id = LStmt id (LHsExpr id) Source #

Expression Located Statement

type ExprStmt id = Stmt id (LHsExpr id) Source #

Expression Statement

type GuardLStmt id = LStmt id (LHsExpr id) Source #

Guard Located Statement

type GuardStmt id = Stmt id (LHsExpr id) Source #

Guard Statement

type GhciLStmt id = LStmt id (LHsExpr id) Source #

Ghci Located Statemnt

type GhciStmt id = Stmt id (LHsExpr id) Source #

Ghci Statement

data StmtLR idL idR body Source #

API Annotations when in qualifier lists or guards - AnnKeywordId : AnnVbar, AnnComma,AnnThen, AnnBy,AnnBy, AnnGroup,AnnUsing

Constructors

LastStmt body Bool (SyntaxExpr idR) 
BindStmt (LPat idL) body (SyntaxExpr idR) (SyntaxExpr idR) (PostTc idR Type) 
ApplicativeStmt [(SyntaxExpr idR, ApplicativeArg idL idR)] (Maybe (SyntaxExpr idR)) (PostTc idR Type)

ApplicativeStmt represents an applicative expression built with $ and *. It is generated by the renamer, and is desugared into the appropriate applicative expression by the desugarer, but it is intended to be invisible in error messages.

For full details, see Note [ApplicativeDo] in RnExpr

BodyStmt body (SyntaxExpr idR) (SyntaxExpr idR) (PostTc idR Type) 
LetStmt (LHsLocalBindsLR idL idR)
ParStmt [ParStmtBlock idL idR] (HsExpr idR) (SyntaxExpr idR) (PostTc idR Type) 
TransStmt 

Fields

RecStmt

Instances

(Data body, DataId idL, DataId idR) => Data (StmtLR idL idR body) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StmtLR idL idR body -> c (StmtLR idL idR body) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (StmtLR idL idR body) #

toConstr :: StmtLR idL idR body -> Constr #

dataTypeOf :: StmtLR idL idR body -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (StmtLR idL idR body)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (StmtLR idL idR body)) #

gmapT :: (forall b. Data b => b -> b) -> StmtLR idL idR body -> StmtLR idL idR body #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR idL idR body -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR idL idR body -> r #

gmapQ :: (forall d. Data d => d -> u) -> StmtLR idL idR body -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> StmtLR idL idR body -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> StmtLR idL idR body -> m (StmtLR idL idR body) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR idL idR body -> m (StmtLR idL idR body) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR idL idR body -> m (StmtLR idL idR body) #

(OutputableBndrId idL, OutputableBndrId idR, Outputable body) => Outputable (StmtLR idL idR body) Source # 

Methods

ppr :: StmtLR idL idR body -> SDoc Source #

pprPrec :: Rational -> StmtLR idL idR body -> SDoc Source #

data TransForm Source #

Constructors

ThenForm 
GroupForm 

Instances

Data TransForm Source # 

Methods

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

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

toConstr :: TransForm -> Constr #

dataTypeOf :: TransForm -> DataType #

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

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

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

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

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

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

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

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

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

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

data ParStmtBlock idL idR Source #

Parenthesised Statement Block

Constructors

ParStmtBlock [ExprLStmt idL] [idR] (SyntaxExpr idR) 

Instances

(DataId idL, DataId idR) => Data (ParStmtBlock idL idR) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ParStmtBlock idL idR -> c (ParStmtBlock idL idR) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ParStmtBlock idL idR) #

toConstr :: ParStmtBlock idL idR -> Constr #

dataTypeOf :: ParStmtBlock idL idR -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (ParStmtBlock idL idR)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ParStmtBlock idL idR)) #

gmapT :: (forall b. Data b => b -> b) -> ParStmtBlock idL idR -> ParStmtBlock idL idR #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ParStmtBlock idL idR -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ParStmtBlock idL idR -> r #

gmapQ :: (forall d. Data d => d -> u) -> ParStmtBlock idL idR -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ParStmtBlock idL idR -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ParStmtBlock idL idR -> m (ParStmtBlock idL idR) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ParStmtBlock idL idR -> m (ParStmtBlock idL idR) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ParStmtBlock idL idR -> m (ParStmtBlock idL idR) #

OutputableBndrId idL => Outputable (ParStmtBlock idL idR) Source # 

Methods

ppr :: ParStmtBlock idL idR -> SDoc Source #

pprPrec :: Rational -> ParStmtBlock idL idR -> SDoc Source #

data ApplicativeArg idL idR Source #

Applicative Argument

Constructors

ApplicativeArgOne (LPat idL) (LHsExpr idL) 
ApplicativeArgMany [ExprLStmt idL] (HsExpr idL) (LPat idL) 

Instances

(DataId idL, DataId idR) => Data (ApplicativeArg idL idR) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ApplicativeArg idL idR -> c (ApplicativeArg idL idR) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ApplicativeArg idL idR) #

toConstr :: ApplicativeArg idL idR -> Constr #

dataTypeOf :: ApplicativeArg idL idR -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (ApplicativeArg idL idR)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ApplicativeArg idL idR)) #

gmapT :: (forall b. Data b => b -> b) -> ApplicativeArg idL idR -> ApplicativeArg idL idR #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ApplicativeArg idL idR -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ApplicativeArg idL idR -> r #

gmapQ :: (forall d. Data d => d -> u) -> ApplicativeArg idL idR -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ApplicativeArg idL idR -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ApplicativeArg idL idR -> m (ApplicativeArg idL idR) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ApplicativeArg idL idR -> m (ApplicativeArg idL idR) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ApplicativeArg idL idR -> m (ApplicativeArg idL idR) #

pprStmt :: forall idL idR body. (OutputableBndrId idL, OutputableBndrId idR, Outputable body) => StmtLR idL idR body -> SDoc Source #

pprTransStmt :: Outputable body => Maybe body -> body -> TransForm -> SDoc Source #

pprBy :: Outputable body => Maybe body -> SDoc Source #

pprDo :: (OutputableBndrId id, Outputable body) => HsStmtContext any -> [LStmt id body] -> SDoc Source #

ppr_do_stmts :: (OutputableBndrId idL, OutputableBndrId idR, Outputable body) => [LStmtLR idL idR body] -> SDoc Source #

pprComp :: (OutputableBndrId id, Outputable body) => [LStmt id body] -> SDoc Source #

pprQuals :: (OutputableBndrId id, Outputable body) => [LStmt id body] -> SDoc Source #

data HsSplice id Source #

Haskell Splice

Instances

DataId id => Data (HsSplice id) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsSplice id -> c (HsSplice id) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsSplice id) #

toConstr :: HsSplice id -> Constr #

dataTypeOf :: HsSplice id -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (HsSplice id)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsSplice id)) #

gmapT :: (forall b. Data b => b -> b) -> HsSplice id -> HsSplice id #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsSplice id -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsSplice id -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsSplice id -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsSplice id -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsSplice id -> m (HsSplice id) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSplice id -> m (HsSplice id) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSplice id -> m (HsSplice id) #

OutputableBndrId id => Outputable (HsSplice id) Source # 

data SpliceDecoration Source #

A splice can appear with various decorations wrapped around it. This data type captures explicitly how it was originally written, for use in the pretty printer.

Constructors

HasParens

$( splice ) or $$( splice )

HasDollar

$splice or $$splice

NoParens

bare splice

Instances

Eq SpliceDecoration Source # 
Data SpliceDecoration Source # 

Methods

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

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

toConstr :: SpliceDecoration -> Constr #

dataTypeOf :: SpliceDecoration -> DataType #

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

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

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

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

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

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

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

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

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

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

Show SpliceDecoration Source # 
Outputable SpliceDecoration Source # 

newtype ThModFinalizers Source #

Finalizers produced by a splice with addModFinalizer

See Note [Delaying modFinalizers in untyped splices] in RnSplice. For how this is used.

Constructors

ThModFinalizers [ForeignRef (Q ())] 

Instances

Data ThModFinalizers Source # 

Methods

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

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

toConstr :: ThModFinalizers -> Constr #

dataTypeOf :: ThModFinalizers -> DataType #

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

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

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

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

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

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

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

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

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

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

data HsSplicedThing id Source #

Haskell Spliced Thing

Values that can result from running a splice.

Constructors

HsSplicedExpr (HsExpr id)

Haskell Spliced Expression

HsSplicedTy (HsType id)

Haskell Spliced Type

HsSplicedPat (Pat id)

Haskell Spliced Pattern

Instances

DataId id => Data (HsSplicedThing id) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsSplicedThing id -> c (HsSplicedThing id) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsSplicedThing id) #

toConstr :: HsSplicedThing id -> Constr #

dataTypeOf :: HsSplicedThing id -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (HsSplicedThing id)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsSplicedThing id)) #

gmapT :: (forall b. Data b => b -> b) -> HsSplicedThing id -> HsSplicedThing id #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsSplicedThing id -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsSplicedThing id -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsSplicedThing id -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsSplicedThing id -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsSplicedThing id -> m (HsSplicedThing id) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSplicedThing id -> m (HsSplicedThing id) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSplicedThing id -> m (HsSplicedThing id) #

OutputableBndrId id => Outputable (HsSplicedThing id) Source # 

data PendingRnSplice Source #

Pending Renamer Splice

Instances

Data PendingRnSplice Source # 

Methods

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

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

toConstr :: PendingRnSplice -> Constr #

dataTypeOf :: PendingRnSplice -> DataType #

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

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

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

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

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

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

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

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

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

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

Outputable PendingRnSplice Source # 

data UntypedSpliceFlavour Source #

Instances

Data UntypedSpliceFlavour Source # 

Methods

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

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

toConstr :: UntypedSpliceFlavour -> Constr #

dataTypeOf :: UntypedSpliceFlavour -> DataType #

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

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

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

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

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

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

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

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

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

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

data PendingTcSplice Source #

Pending Type-checker Splice

Instances

Data PendingTcSplice Source # 

Methods

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

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

toConstr :: PendingTcSplice -> Constr #

dataTypeOf :: PendingTcSplice -> DataType #

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

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

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

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

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

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

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

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

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

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

Outputable PendingTcSplice Source # 

data HsBracket id Source #

Haskell Bracket

Constructors

ExpBr (LHsExpr id) 
PatBr (LPat id) 
DecBrL [LHsDecl id] 
DecBrG (HsGroup id) 
TypBr (LHsType id) 
VarBr Bool id 
TExpBr (LHsExpr id) 

Instances

DataId id => Data (HsBracket id) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsBracket id -> c (HsBracket id) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsBracket id) #

toConstr :: HsBracket id -> Constr #

dataTypeOf :: HsBracket id -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (HsBracket id)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsBracket id)) #

gmapT :: (forall b. Data b => b -> b) -> HsBracket id -> HsBracket id #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsBracket id -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsBracket id -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsBracket id -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsBracket id -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsBracket id -> m (HsBracket id) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsBracket id -> m (HsBracket id) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsBracket id -> m (HsBracket id) #

OutputableBndrId id => Outputable (HsBracket id) Source # 

data ArithSeqInfo id Source #

Arithmetic Sequence Information

Constructors

From (LHsExpr id) 
FromThen (LHsExpr id) (LHsExpr id) 
FromTo (LHsExpr id) (LHsExpr id) 
FromThenTo (LHsExpr id) (LHsExpr id) (LHsExpr id) 

Instances

DataId id => Data (ArithSeqInfo id) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ArithSeqInfo id -> c (ArithSeqInfo id) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ArithSeqInfo id) #

toConstr :: ArithSeqInfo id -> Constr #

dataTypeOf :: ArithSeqInfo id -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (ArithSeqInfo id)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ArithSeqInfo id)) #

gmapT :: (forall b. Data b => b -> b) -> ArithSeqInfo id -> ArithSeqInfo id #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ArithSeqInfo id -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ArithSeqInfo id -> r #

gmapQ :: (forall d. Data d => d -> u) -> ArithSeqInfo id -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ArithSeqInfo id -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ArithSeqInfo id -> m (ArithSeqInfo id) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ArithSeqInfo id -> m (ArithSeqInfo id) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ArithSeqInfo id -> m (ArithSeqInfo id) #

OutputableBndrId id => Outputable (ArithSeqInfo id) Source # 

data HsMatchContext id Source #

Haskell Match Context

Context of a pattern match. This is more subtle than it would seem. See Note [Varieties of pattern matches].

Constructors

FunRhs

A pattern matching on an argument of a function binding

Fields

LambdaExpr

Patterns of a lambda

CaseAlt

Patterns and guards on a case alternative

IfAlt

Guards of a multi-way if alternative

ProcExpr

Patterns of a proc

PatBindRhs

A pattern binding eg [y] <- e = e

RecUpd

Record update [used only in DsExpr to tell matchWrapper what sort of runtime error message to generate]

StmtCtxt (HsStmtContext id)

Pattern of a do-stmt, list comprehension, pattern guard, etc

ThPatSplice

A Template Haskell pattern splice

ThPatQuote

A Template Haskell pattern quotation [p| (a,b) |]

PatSyn

A pattern synonym declaration

Instances

Functor HsMatchContext Source # 

Methods

fmap :: (a -> b) -> HsMatchContext a -> HsMatchContext b #

(<$) :: a -> HsMatchContext b -> HsMatchContext a #

DataIdPost id => Data (HsMatchContext id) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsMatchContext id -> c (HsMatchContext id) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsMatchContext id) #

toConstr :: HsMatchContext id -> Constr #

dataTypeOf :: HsMatchContext id -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (HsMatchContext id)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsMatchContext id)) #

gmapT :: (forall b. Data b => b -> b) -> HsMatchContext id -> HsMatchContext id #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsMatchContext id -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsMatchContext id -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsMatchContext id -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsMatchContext id -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsMatchContext id -> m (HsMatchContext id) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsMatchContext id -> m (HsMatchContext id) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsMatchContext id -> m (HsMatchContext id) #

OutputableBndr id => Outputable (HsMatchContext id) Source # 

data HsStmtContext id Source #

Haskell Statement Context

Constructors

ListComp 
MonadComp 
PArrComp

Parallel array comprehension

DoExpr

do { ... }

MDoExpr

mdo { ... } ie recursive do-expression

ArrowExpr

do-notation in an arrow-command context

GhciStmtCtxt

A command-line Stmt in GHCi pat <- rhs

PatGuard (HsMatchContext id)

Pattern guard for specified thing

ParStmtCtxt (HsStmtContext id)

A branch of a parallel stmt

TransStmtCtxt (HsStmtContext id)

A branch of a transform stmt

Instances

Functor HsStmtContext Source # 

Methods

fmap :: (a -> b) -> HsStmtContext a -> HsStmtContext b #

(<$) :: a -> HsStmtContext b -> HsStmtContext a #

DataIdPost id => Data (HsStmtContext id) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsStmtContext id -> c (HsStmtContext id) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsStmtContext id) #

toConstr :: HsStmtContext id -> Constr #

dataTypeOf :: HsStmtContext id -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (HsStmtContext id)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsStmtContext id)) #

gmapT :: (forall b. Data b => b -> b) -> HsStmtContext id -> HsStmtContext id #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsStmtContext id -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsStmtContext id -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsStmtContext id -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsStmtContext id -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsStmtContext id -> m (HsStmtContext id) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsStmtContext id -> m (HsStmtContext id) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsStmtContext id -> m (HsStmtContext id) #

(Outputable id, Outputable (NameOrRdrName id)) => Outputable (HsStmtContext id) Source # 

isMonadFailStmtContext :: HsStmtContext id -> Bool Source #

Should pattern match failure in a HsStmtContext be desugared using MonadFail?