ghc-8.4.3: The GHC API

Safe HaskellNone
LanguageHaskell2010

HsExpr

Contents

Description

Abstract Haskell syntax for expressions.

Synopsis

Expressions proper

type LHsExpr p Source #

Arguments

 = Located (HsExpr p)

May have AnnKeywordId : AnnComma when in a list

Located Haskell Expression

type PostTcExpr = HsExpr GhcTc 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 p 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 p => Data (SyntaxExpr p) Source # 
Instance details

Defined in HsExpr

Methods

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

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

toConstr :: SyntaxExpr p -> Constr Source #

dataTypeOf :: SyntaxExpr p -> DataType Source #

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

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

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

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

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

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

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

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

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

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

(SourceTextX p, OutputableBndrId p) => Outputable (SyntaxExpr p) Source # 
Instance details

Defined in HsExpr

noExpr :: SourceTextX p => HsExpr p Source #

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

mkRnSyntaxExpr :: Name -> SyntaxExpr GhcRn Source #

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

type CmdSyntaxTable p = [(Name, HsExpr p)] 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 # 
Instance details

Defined in HsExpr

Methods

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

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

toConstr :: UnboundVar -> Constr Source #

dataTypeOf :: UnboundVar -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable UnboundVar Source # 
Instance details

Defined in HsExpr

data HsExpr p Source #

A Haskell expression.

Constructors

HsVar (Located (IdP p))

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 p)

Variable pointing to record selector Not in use after typechecking

HsOverLabel (Maybe (IdP p)) 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 p)

Overloaded literals

HsLit (HsLit p)

Simple (non-overloaded) literals

HsLam (MatchGroup p (LHsExpr p))

Lambda abstraction. Currently always a single match

HsLamCase (MatchGroup p (LHsExpr p))

Lambda-case

HsApp (LHsExpr p) (LHsExpr p)

Application

HsAppType (LHsExpr p) (LHsWcType p)

Visible type application

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

HsAppTypeOut (LHsExpr p) (LHsWcType GhcRn) 
OpApp (LHsExpr p) (LHsExpr p) (PostRn p Fixity) (LHsExpr p)

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

NegApp (LHsExpr p) (SyntaxExpr p)

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

HsPar (LHsExpr p)

Parenthesised expr; see Note [Parens in HsSyn]

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

Used for explicit tuples and sections thereof

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

Used for unboxed sum types

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

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

Multi-way if

HsLet (LHsLocalBinds p) (LHsExpr p)

let(rec)

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

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

ExplicitPArr (PostTc p Type) [LHsExpr p]

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

RecordCon

Record construction

RecordUpd

Record update

ExprWithTySig (LHsExpr p) (LHsSigWcType p)

Expression with an explicit type signature. e :: type

ExprWithTySigOut (LHsExpr p) (LHsSigWcType GhcRn) 
ArithSeq PostTcExpr (Maybe (SyntaxExpr p)) (ArithSeqInfo p)

Arithmetic sequence

PArrSeq PostTcExpr (ArithSeqInfo p)

Arithmetic sequence for parallel array

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

proc notation for Arrows

HsStatic (PostRn p NameSet) (LHsExpr p)
HsArrApp (LHsExpr p) (LHsExpr p) (PostTc p Type) HsArrAppType Bool
HsArrForm (LHsExpr p) (Maybe Fixity) [LHsCmdTop p]
HsTick (Tickish (IdP p)) (LHsExpr p) 
HsBinTick Int Int (LHsExpr p) 
HsTickPragma SourceText (StringLiteral, (Int, Int), (Int, Int)) ((SourceText, SourceText), (SourceText, SourceText)) (LHsExpr p)
EWildPat 
EAsPat (Located (IdP p)) (LHsExpr p)
EViewPat (LHsExpr p) (LHsExpr p)
ELazyPat (LHsExpr p)
HsWrap HsWrapper (HsExpr p) 
Instances
DataId p => Data (HsExpr p) Source # 
Instance details

Defined in HsExpr

Methods

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

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

toConstr :: HsExpr p -> Constr Source #

dataTypeOf :: HsExpr p -> DataType Source #

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

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

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

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

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

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

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

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

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

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

(SourceTextX p, OutputableBndrId p) => Outputable (HsExpr p) Source # 
Instance details

Defined in HsExpr

Methods

ppr :: HsExpr p -> SDoc Source #

pprPrec :: Rational -> HsExpr p -> 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 # 
Instance details

Defined in HsExpr

Methods

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

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

toConstr :: HsTupArg id -> Constr Source #

dataTypeOf :: HsTupArg id -> DataType Source #

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

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

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

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

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

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

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

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

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

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

data LHsWcTypeX Source #

Located Haskell Wildcard Type Expression

Constructors

(SourceTextX p, OutputableBndrId p) => LHsWcTypeX (LHsWcType p) 

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 # 
Instance details

Defined in HsExpr

Methods

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

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

toConstr :: HsCmd id -> Constr Source #

dataTypeOf :: HsCmd id -> DataType Source #

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

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

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

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

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

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

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

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

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

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

(SourceTextX p, OutputableBndrId p) => Outputable (HsCmd p) Source # 
Instance details

Defined in HsExpr

Methods

ppr :: HsCmd p -> SDoc Source #

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

data HsArrAppType Source #

Haskell Array Application Type

Instances
Data HsArrAppType Source # 
Instance details

Defined in HsExpr

Methods

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

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

toConstr :: HsArrAppType -> Constr Source #

dataTypeOf :: HsArrAppType -> DataType Source #

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

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

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

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

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

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

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

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

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

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

type LHsCmdTop p = Located (HsCmdTop p) 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 p Source #

Haskell Top-level Command

Constructors

HsCmdTop (LHsCmd p) (PostTc p Type) (PostTc p Type) (CmdSyntaxTable p) 
Instances
DataId p => Data (HsCmdTop p) Source # 
Instance details

Defined in HsExpr

Methods

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

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

toConstr :: HsCmdTop p -> Constr Source #

dataTypeOf :: HsCmdTop p -> DataType Source #

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

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

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

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

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

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

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

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

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

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

(SourceTextX p, OutputableBndrId p) => Outputable (HsCmdTop p) Source # 
Instance details

Defined in HsExpr

ppr_cmd :: forall p. (SourceTextX p, OutputableBndrId p) => HsCmd p -> SDoc Source #

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

Haskell Record Bindings

data MatchGroup p body Source #

Constructors

MG 
Instances
(Data body, DataId p) => Data (MatchGroup p body) Source # 
Instance details

Defined in HsExpr

Methods

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

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

toConstr :: MatchGroup p body -> Constr Source #

dataTypeOf :: MatchGroup p body -> DataType Source #

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

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

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

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

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

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

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

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

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

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

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

Located Match

May have AnnKeywordId : AnnSemi when in a list

data Match p body Source #

Constructors

Match 

Fields

Instances
(Data body, DataId p) => Data (Match p body) Source # 
Instance details

Defined in HsExpr

Methods

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

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

toConstr :: Match p body -> Constr Source #

dataTypeOf :: Match p body -> DataType Source #

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

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

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

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

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

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

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

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

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

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

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

Defined in HsExpr

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 p body Source #

Guarded Right-Hand Sides

GRHSs are used both for pattern bindings and for Matches

Constructors

GRHSs 

Fields

Instances
(Data body, DataId p) => Data (GRHSs p body) Source # 
Instance details

Defined in HsExpr

Methods

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

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

toConstr :: GRHSs p body -> Constr Source #

dataTypeOf :: GRHSs p body -> DataType Source #

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

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

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

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

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

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

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

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

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

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

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 # 
Instance details

Defined in HsExpr

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) Source #

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

toConstr :: GRHS id body -> Constr Source #

dataTypeOf :: GRHS id body -> DataType Source #

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

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

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

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

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

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

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

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

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

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

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

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

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

pprGRHS :: (SourceTextX idR, 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 Statement

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 # 
Instance details

Defined in HsExpr

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) Source #

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

toConstr :: StmtLR idL idR body -> Constr Source #

dataTypeOf :: StmtLR idL idR body -> DataType Source #

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

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

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

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

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

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

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

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

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

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

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

Defined in HsExpr

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 # 
Instance details

Defined in HsExpr

Methods

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

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

toConstr :: TransForm -> Constr Source #

dataTypeOf :: TransForm -> DataType Source #

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

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

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

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

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

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

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

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

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

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

data ParStmtBlock idL idR Source #

Parenthesised Statement Block

Constructors

ParStmtBlock [ExprLStmt idL] [IdP idR] (SyntaxExpr idR) 
Instances
(DataId idL, DataId idR) => Data (ParStmtBlock idL idR) Source # 
Instance details

Defined in HsExpr

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) Source #

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

toConstr :: ParStmtBlock idL idR -> Constr Source #

dataTypeOf :: ParStmtBlock idL idR -> DataType Source #

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

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

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

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

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

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

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

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

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

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

(SourceTextX idL, OutputableBndrId idL) => Outputable (ParStmtBlock idL idR) Source # 
Instance details

Defined in HsExpr

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) Bool 
ApplicativeArgMany [ExprLStmt idL] (HsExpr idL) (LPat idL) 
Instances
(DataId idL, DataId idR) => Data (ApplicativeArg idL idR) Source # 
Instance details

Defined in HsExpr

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) Source #

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

toConstr :: ApplicativeArg idL idR -> Constr Source #

dataTypeOf :: ApplicativeArg idL idR -> DataType Source #

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

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

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

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

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

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

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

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

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

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

pprStmt :: forall idL idR body. (SourceTextX idL, SourceTextX idR, 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 #

data HsSplice id Source #

Haskell Splice

Instances
DataId id => Data (HsSplice id) Source # 
Instance details

Defined in HsExpr

Methods

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

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

toConstr :: HsSplice id -> Constr Source #

dataTypeOf :: HsSplice id -> DataType Source #

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

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

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

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

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

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

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

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

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

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

(SourceTextX p, OutputableBndrId p) => Outputable (HsSplice p) Source # 
Instance details

Defined in HsExpr

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 # 
Instance details

Defined in HsExpr

Data SpliceDecoration Source # 
Instance details

Defined in HsExpr

Methods

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

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

toConstr :: SpliceDecoration -> Constr Source #

dataTypeOf :: SpliceDecoration -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show SpliceDecoration Source # 
Instance details

Defined in HsExpr

Outputable SpliceDecoration Source # 
Instance details

Defined in HsExpr

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 # 
Instance details

Defined in HsExpr

Methods

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

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

toConstr :: ThModFinalizers -> Constr Source #

dataTypeOf :: ThModFinalizers -> DataType Source #

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

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

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

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

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

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

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

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

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

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

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 # 
Instance details

Defined in HsExpr

Methods

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

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

toConstr :: HsSplicedThing id -> Constr Source #

dataTypeOf :: HsSplicedThing id -> DataType Source #

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

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

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

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

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

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

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

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

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

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

(SourceTextX p, OutputableBndrId p) => Outputable (HsSplicedThing p) Source # 
Instance details

Defined in HsExpr

data PendingRnSplice Source #

Pending Renamer Splice

Instances
Data PendingRnSplice Source # 
Instance details

Defined in HsExpr

Methods

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

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

toConstr :: PendingRnSplice -> Constr Source #

dataTypeOf :: PendingRnSplice -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable PendingRnSplice Source # 
Instance details

Defined in HsExpr

data UntypedSpliceFlavour Source #

Instances
Data UntypedSpliceFlavour Source # 
Instance details

Defined in HsExpr

Methods

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

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

toConstr :: UntypedSpliceFlavour -> Constr Source #

dataTypeOf :: UntypedSpliceFlavour -> DataType Source #

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

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

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

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

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

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

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

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

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

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

data PendingTcSplice Source #

Pending Type-checker Splice

Instances
Data PendingTcSplice Source # 
Instance details

Defined in HsExpr

Methods

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

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

toConstr :: PendingTcSplice -> Constr Source #

dataTypeOf :: PendingTcSplice -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable PendingTcSplice Source # 
Instance details

Defined in HsExpr

data HsBracket p Source #

Haskell Bracket

Constructors

ExpBr (LHsExpr p) 
PatBr (LPat p) 
DecBrL [LHsDecl p] 
DecBrG (HsGroup p) 
TypBr (LHsType p) 
VarBr Bool (IdP p) 
TExpBr (LHsExpr p) 
Instances
DataId p => Data (HsBracket p) Source # 
Instance details

Defined in HsExpr

Methods

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

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

toConstr :: HsBracket p -> Constr Source #

dataTypeOf :: HsBracket p -> DataType Source #

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

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

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

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

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

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

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

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

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

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

(SourceTextX p, OutputableBndrId p) => Outputable (HsBracket p) Source # 
Instance details

Defined in HsExpr

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 # 
Instance details

Defined in HsExpr

Methods

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

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

toConstr :: ArithSeqInfo id -> Constr Source #

dataTypeOf :: ArithSeqInfo id -> DataType Source #

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

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

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

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

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

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

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

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

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

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

(SourceTextX p, OutputableBndrId p) => Outputable (ArithSeqInfo p) Source # 
Instance details

Defined in HsExpr

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 # 
Instance details

Defined in HsExpr

Methods

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

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

Data id => Data (HsMatchContext id) Source # 
Instance details

Defined in HsExpr

Methods

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

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

toConstr :: HsMatchContext id -> Constr Source #

dataTypeOf :: HsMatchContext id -> DataType Source #

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

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

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

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

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

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

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

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

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

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

OutputableBndr id => Outputable (HsMatchContext id) Source # 
Instance details

Defined in HsExpr

data HsStmtContext id Source #

Haskell Statement Context. It expects to be parameterised with one of RdrName, Name or Id

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 # 
Instance details

Defined in HsExpr

Methods

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

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

Data id => Data (HsStmtContext id) Source # 
Instance details

Defined in HsExpr

Methods

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

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

toConstr :: HsStmtContext id -> Constr Source #

dataTypeOf :: HsStmtContext id -> DataType Source #

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

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

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

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

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

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

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

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

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

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

(Outputable p, Outputable (NameOrRdrName p)) => Outputable (HsStmtContext p) Source # 
Instance details

Defined in HsExpr

isMonadFailStmtContext :: HsStmtContext id -> Bool Source #

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