Safe Haskell | None |
---|---|
Language | Haskell2010 |
HsExpr
Contents
Description
Abstract Haskell syntax for expressions.
- type LHsExpr id = Located (HsExpr id)
- type PostTcExpr = HsExpr Id
- type PostTcTable = [(Name, PostTcExpr)]
- noPostTcExpr :: PostTcExpr
- noPostTcTable :: PostTcTable
- type SyntaxExpr id = HsExpr id
- noSyntaxExpr :: SyntaxExpr id
- type CmdSyntaxTable id = [(Name, SyntaxExpr id)]
- data HsExpr id
- = HsVar (Located id)
- | HsUnboundVar OccName
- | HsRecFld (AmbiguousFieldOcc id)
- | HsOverLabel FastString
- | HsIPVar HsIPName
- | HsOverLit (HsOverLit id)
- | HsLit HsLit
- | HsLam (MatchGroup id (LHsExpr id))
- | HsLamCase (PostTc id Type) (MatchGroup id (LHsExpr id))
- | HsApp (LHsExpr id) (LHsExpr id)
- | OpApp (LHsExpr id) (LHsExpr id) (PostRn id Fixity) (LHsExpr id)
- | NegApp (LHsExpr id) (SyntaxExpr id)
- | HsPar (LHsExpr id)
- | SectionL (LHsExpr id) (LHsExpr id)
- | SectionR (LHsExpr id) (LHsExpr id)
- | ExplicitTuple [LHsTupArg id] Boxity
- | 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)]
- | HsLet (Located (HsLocalBinds id)) (LHsExpr id)
- | HsDo (HsStmtContext Name) (Located [ExprLStmt id]) (PostTc id Type)
- | ExplicitList (PostTc id Type) (Maybe (SyntaxExpr id)) [LHsExpr id]
- | ExplicitPArr (PostTc id Type) [LHsExpr id]
- | RecordCon {
- rcon_con_name :: Located id
- rcon_con_like :: PostTc id ConLike
- rcon_con_expr :: PostTcExpr
- rcon_flds :: HsRecordBinds id
- | RecordUpd { }
- | ExprWithTySig (LHsExpr id) (LHsSigWcType id)
- | ExprWithTySigOut (LHsExpr id) (LHsSigWcType Name)
- | ArithSeq PostTcExpr (Maybe (SyntaxExpr id)) (ArithSeqInfo id)
- | PArrSeq PostTcExpr (ArithSeqInfo id)
- | 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)
- | HsStatic (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)) (LHsExpr id)
- | EWildPat
- | EAsPat (Located id) (LHsExpr id)
- | EViewPat (LHsExpr id) (LHsExpr id)
- | ELazyPat (LHsExpr id)
- | HsType (LHsWcType id)
- | HsTypeOut (LHsWcType Name)
- | HsWrap HsWrapper (HsExpr id)
- type LHsTupArg id = Located (HsTupArg id)
- data HsTupArg id
- tupArgPresent :: LHsTupArg id -> Bool
- pprLExpr :: OutputableBndr id => LHsExpr id -> SDoc
- pprExpr :: OutputableBndr id => HsExpr id -> SDoc
- isQuietHsExpr :: HsExpr id -> Bool
- pprBinds :: (OutputableBndr idL, OutputableBndr idR) => HsLocalBindsLR idL idR -> SDoc
- ppr_lexpr :: OutputableBndr id => LHsExpr id -> SDoc
- ppr_expr :: forall id. OutputableBndr id => HsExpr id -> SDoc
- pprExternalSrcLoc :: (StringLiteral, (Int, Int), (Int, Int)) -> SDoc
- pprDebugParendExpr :: OutputableBndr id => LHsExpr id -> SDoc
- pprParendExpr :: OutputableBndr id => LHsExpr id -> SDoc
- hsExprNeedsParens :: HsExpr id -> Bool
- isAtomicHsExpr :: HsExpr id -> Bool
- type LHsCmd id = Located (HsCmd id)
- data HsCmd id
- = HsCmdArrApp (LHsExpr id) (LHsExpr id) (PostTc id Type) HsArrAppType Bool
- | HsCmdArrForm (LHsExpr id) (Maybe Fixity) [LHsCmdTop id]
- | HsCmdApp (LHsCmd id) (LHsExpr id)
- | HsCmdLam (MatchGroup id (LHsCmd id))
- | HsCmdPar (LHsCmd id)
- | HsCmdCase (LHsExpr id) (MatchGroup id (LHsCmd id))
- | HsCmdIf (Maybe (SyntaxExpr id)) (LHsExpr id) (LHsCmd id) (LHsCmd id)
- | HsCmdLet (Located (HsLocalBinds id)) (LHsCmd id)
- | HsCmdDo (Located [CmdLStmt id]) (PostTc id Type)
- | HsCmdWrap HsWrapper (HsCmd id)
- data HsArrAppType
- type LHsCmdTop id = Located (HsCmdTop id)
- data HsCmdTop id = HsCmdTop (LHsCmd id) (PostTc id Type) (PostTc id Type) (CmdSyntaxTable id)
- pprLCmd :: OutputableBndr id => LHsCmd id -> SDoc
- pprCmd :: OutputableBndr id => HsCmd id -> SDoc
- isQuietHsCmd :: HsCmd id -> Bool
- ppr_lcmd :: OutputableBndr id => LHsCmd id -> SDoc
- ppr_cmd :: forall id. OutputableBndr id => HsCmd id -> SDoc
- pprCmdArg :: OutputableBndr id => HsCmdTop id -> SDoc
- type HsRecordBinds id = HsRecFields id (LHsExpr id)
- data MatchGroup id body = MG {}
- type LMatch id body = Located (Match id body)
- data Match id body = Match {}
- data MatchFixity id
- = NonFunBindMatch
- | FunBindMatch (Located id) Bool
- isInfixMatch :: Match id body -> Bool
- isEmptyMatchGroup :: MatchGroup id body -> Bool
- isSingletonMatchGroup :: MatchGroup id body -> Bool
- matchGroupArity :: MatchGroup id body -> Arity
- hsLMatchPats :: LMatch id body -> [LPat id]
- data GRHSs id body = GRHSs {
- grhssGRHSs :: [LGRHS id body]
- grhssLocalBinds :: Located (HsLocalBinds id)
- type LGRHS id body = Located (GRHS id body)
- data GRHS id body = GRHS [GuardLStmt id] body
- pprMatches :: (OutputableBndr idL, OutputableBndr idR, Outputable body) => HsMatchContext idL -> MatchGroup idR body -> SDoc
- pprFunBind :: (OutputableBndr idL, OutputableBndr idR, Outputable body) => idL -> MatchGroup idR body -> SDoc
- pprPatBind :: forall bndr id body. (OutputableBndr bndr, OutputableBndr id, Outputable body) => LPat bndr -> GRHSs id body -> SDoc
- pprMatch :: (OutputableBndr idL, OutputableBndr idR, Outputable body) => HsMatchContext idL -> Match idR body -> SDoc
- pprGRHSs :: (OutputableBndr idR, Outputable body) => HsMatchContext idL -> GRHSs idR body -> SDoc
- pprGRHS :: (OutputableBndr idR, Outputable body) => HsMatchContext idL -> GRHS idR body -> SDoc
- pp_rhs :: Outputable body => HsMatchContext idL -> body -> SDoc
- type LStmt id body = Located (StmtLR id id body)
- type LStmtLR idL idR body = Located (StmtLR idL idR body)
- type Stmt id body = StmtLR id id body
- type CmdLStmt id = LStmt id (LHsCmd id)
- type CmdStmt id = Stmt id (LHsCmd id)
- type ExprLStmt id = LStmt id (LHsExpr id)
- type ExprStmt id = Stmt id (LHsExpr id)
- type GuardLStmt id = LStmt id (LHsExpr id)
- type GuardStmt id = Stmt id (LHsExpr id)
- type GhciLStmt id = LStmt id (LHsExpr id)
- type GhciStmt id = Stmt id (LHsExpr id)
- data StmtLR idL idR body
- = LastStmt body Bool (SyntaxExpr idR)
- | BindStmt (LPat idL) body (SyntaxExpr idR) (SyntaxExpr idR)
- | ApplicativeStmt [(SyntaxExpr idR, ApplicativeArg idL idR)] (Maybe (SyntaxExpr idR)) (PostTc idR Type)
- | BodyStmt body (SyntaxExpr idR) (SyntaxExpr idR) (PostTc idR Type)
- | LetStmt (Located (HsLocalBindsLR idL idR))
- | ParStmt [ParStmtBlock idL idR] (SyntaxExpr idR) (SyntaxExpr idR)
- | TransStmt { }
- | RecStmt {
- recS_stmts :: [LStmtLR idL idR body]
- recS_later_ids :: [idR]
- recS_rec_ids :: [idR]
- recS_bind_fn :: SyntaxExpr idR
- recS_ret_fn :: SyntaxExpr idR
- recS_mfix_fn :: SyntaxExpr idR
- recS_later_rets :: [PostTcExpr]
- recS_rec_rets :: [PostTcExpr]
- recS_ret_ty :: PostTc idR Type
- data TransForm
- data ParStmtBlock idL idR = ParStmtBlock [ExprLStmt idL] [idR] (SyntaxExpr idR)
- data ApplicativeArg idL idR
- = ApplicativeArgOne (LPat idL) (LHsExpr idL)
- | ApplicativeArgMany [ExprLStmt idL] (SyntaxExpr idL) (LPat idL)
- pprStmt :: forall idL idR body. (OutputableBndr idL, OutputableBndr idR, Outputable body) => StmtLR idL idR body -> SDoc
- pprTransformStmt :: OutputableBndr id => [id] -> LHsExpr id -> Maybe (LHsExpr id) -> SDoc
- pprTransStmt :: Outputable body => Maybe body -> body -> TransForm -> SDoc
- pprBy :: Outputable body => Maybe body -> SDoc
- pprDo :: (OutputableBndr id, Outputable body) => HsStmtContext any -> [LStmt id body] -> SDoc
- ppr_do_stmts :: (OutputableBndr idL, OutputableBndr idR, Outputable body) => [LStmtLR idL idR body] -> SDoc
- pprComp :: (OutputableBndr id, Outputable body) => [LStmt id body] -> SDoc
- pprQuals :: (OutputableBndr id, Outputable body) => [LStmt id body] -> SDoc
- data HsSplice id
- = HsTypedSplice id (LHsExpr id)
- | HsUntypedSplice id (LHsExpr id)
- | HsQuasiQuote id id SrcSpan FastString
- isTypedSplice :: HsSplice id -> Bool
- type SplicePointName = Name
- data PendingRnSplice = PendingRnSplice UntypedSpliceFlavour SplicePointName (LHsExpr Name)
- data UntypedSpliceFlavour
- data PendingTcSplice = PendingTcSplice SplicePointName (LHsExpr Id)
- pprPendingSplice :: OutputableBndr id => SplicePointName -> LHsExpr id -> SDoc
- pprSplice :: OutputableBndr id => HsSplice id -> SDoc
- ppr_quasi :: OutputableBndr id => id -> id -> FastString -> SDoc
- ppr_splice :: OutputableBndr id => SDoc -> id -> LHsExpr id -> SDoc
- data HsBracket id
- isTypedBracket :: HsBracket id -> Bool
- pprHsBracket :: OutputableBndr id => HsBracket id -> SDoc
- thBrackets :: SDoc -> SDoc -> SDoc
- thTyBrackets :: SDoc -> SDoc
- data ArithSeqInfo id
- pp_dotdot :: SDoc
- data HsMatchContext id
- = FunRhs id
- | LambdaExpr
- | CaseAlt
- | IfAlt
- | ProcExpr
- | PatBindRhs
- | RecUpd
- | StmtCtxt (HsStmtContext id)
- | ThPatSplice
- | ThPatQuote
- | PatSyn
- data HsStmtContext id
- = ListComp
- | MonadComp
- | PArrComp
- | DoExpr
- | MDoExpr
- | ArrowExpr
- | GhciStmtCtxt
- | PatGuard (HsMatchContext id)
- | ParStmtCtxt (HsStmtContext id)
- | TransStmtCtxt (HsStmtContext id)
- isListCompExpr :: HsStmtContext id -> Bool
- isMonadCompExpr :: HsStmtContext id -> Bool
- matchSeparator :: HsMatchContext id -> SDoc
- pprMatchContext :: Outputable id => HsMatchContext id -> SDoc
- pprMatchContextNoun :: Outputable id => HsMatchContext id -> SDoc
- pprAStmtContext :: Outputable id => HsStmtContext id -> SDoc
- pprStmtContext :: Outputable id => HsStmtContext id -> SDoc
- matchContextErrString :: Outputable id => HsMatchContext id -> SDoc
- pprMatchInCtxt :: (OutputableBndr idL, OutputableBndr idR, Outputable body) => HsMatchContext idL -> Match idR body -> SDoc
- pprStmtInCtxt :: (OutputableBndr idL, OutputableBndr idR, Outputable body) => HsStmtContext idL -> StmtLR idL idR body -> SDoc
Expressions proper
Arguments
= Located (HsExpr id) | May have |
type PostTcExpr = HsExpr Id Source
PostTcExpr is an evidence expression attached to the syntax tree by the type checker (c.f. postTcType).
type PostTcTable = [(Name, PostTcExpr)] Source
We use a PostTcTable where there are a bunch of pieces of evidence, more than is convenient to keep individually.
type SyntaxExpr id = HsExpr id Source
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
noSyntaxExpr :: SyntaxExpr id Source
type CmdSyntaxTable id = [(Name, SyntaxExpr id)] Source
A Haskell expression.
Constructors
HsVar (Located id) | Variable |
HsUnboundVar OccName | Unbound variable; also used for "holes" _, or _x. Turned from HsVar to HsUnboundVar by the renamer, when it finds an out-of-scope variable Turned into HsVar by type checker, to support deferred type errors. (The HsUnboundVar only has an OccName.) |
HsRecFld (AmbiguousFieldOcc id) | Variable pointing to record selector |
HsOverLabel FastString | Overloaded label (See Note [Overloaded labels] in GHC.OverloadedLabels) |
HsIPVar HsIPName | Implicit parameter |
HsOverLit (HsOverLit id) | Overloaded literals |
HsLit HsLit | Simple (non-overloaded) literals |
HsLam (MatchGroup id (LHsExpr id)) | Lambda abstraction. Currently always a single match |
HsLamCase (PostTc id Type) (MatchGroup id (LHsExpr id)) | Lambda-case |
HsApp (LHsExpr id) (LHsExpr id) | Application |
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 |
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 |
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 (Located (HsLocalBinds 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
|
Fields
| |
RecordUpd | Record update
|
ExprWithTySig (LHsExpr id) (LHsSigWcType id) | Expression with an explicit type signature. |
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) |
|
HsStatic (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)) (LHsExpr id) | |
EWildPat | |
EAsPat (Located id) (LHsExpr id) | |
EViewPat (LHsExpr id) (LHsExpr id) | |
ELazyPat (LHsExpr id) | |
HsType (LHsWcType id) | Use for type application in expressions.
|
HsTypeOut (LHsWcType Name) | |
HsWrap HsWrapper (HsExpr id) |
Instances
DataId id => Data (HsExpr id) | |
OutputableBndr id => Outputable (HsExpr id) | |
type LHsTupArg id = Located (HsTupArg id) Source
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))
tupArgPresent :: LHsTupArg id -> Bool Source
pprLExpr :: OutputableBndr id => LHsExpr id -> SDoc Source
pprExpr :: OutputableBndr id => HsExpr id -> SDoc Source
isQuietHsExpr :: HsExpr id -> Bool Source
pprBinds :: (OutputableBndr idL, OutputableBndr idR) => HsLocalBindsLR idL idR -> SDoc Source
ppr_lexpr :: OutputableBndr id => LHsExpr id -> SDoc Source
ppr_expr :: forall id. OutputableBndr id => HsExpr id -> SDoc Source
pprExternalSrcLoc :: (StringLiteral, (Int, Int), (Int, Int)) -> SDoc Source
pprDebugParendExpr :: OutputableBndr id => LHsExpr id -> SDoc Source
pprParendExpr :: OutputableBndr id => LHsExpr id -> SDoc Source
hsExprNeedsParens :: HsExpr id -> Bool Source
isAtomicHsExpr :: HsExpr id -> Bool Source
Constructors
HsCmdArrApp (LHsExpr id) (LHsExpr id) (PostTc id Type) HsArrAppType Bool | |
HsCmdArrForm (LHsExpr id) (Maybe Fixity) [LHsCmdTop id] |
|
HsCmdApp (LHsCmd id) (LHsExpr id) | |
HsCmdLam (MatchGroup id (LHsCmd id)) | |
HsCmdPar (LHsCmd id) |
|
HsCmdCase (LHsExpr id) (MatchGroup id (LHsCmd id)) |
|
HsCmdIf (Maybe (SyntaxExpr id)) (LHsExpr id) (LHsCmd id) (LHsCmd id) | |
HsCmdLet (Located (HsLocalBinds id)) (LHsCmd id) |
|
HsCmdDo (Located [CmdLStmt id]) (PostTc id Type) | |
HsCmdWrap HsWrapper (HsCmd id) |
Instances
DataId id => Data (HsCmd id) | |
OutputableBndr id => Outputable (HsCmd id) | |
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.
Instances
DataId id => Data (HsCmdTop id) | |
OutputableBndr id => Outputable (HsCmdTop id) | |
pprLCmd :: OutputableBndr id => LHsCmd id -> SDoc Source
pprCmd :: OutputableBndr id => HsCmd id -> SDoc Source
isQuietHsCmd :: HsCmd id -> Bool Source
ppr_lcmd :: OutputableBndr id => LHsCmd id -> SDoc Source
ppr_cmd :: forall id. OutputableBndr id => HsCmd id -> SDoc Source
pprCmdArg :: OutputableBndr id => HsCmdTop id -> SDoc Source
type HsRecordBinds id = HsRecFields id (LHsExpr id) Source
data MatchGroup id body Source
Constructors
MG | |
Instances
(Data body, DataId id) => Data (MatchGroup id body) | |
Constructors
Match | |
data MatchFixity id Source
When a Match is part of a FunBind, it captures one complete equation for the function. As such it has the function name, and its fixity.
Constructors
NonFunBindMatch | |
FunBindMatch (Located id) Bool |
Instances
DataId id => Data (MatchFixity id) | |
isInfixMatch :: Match id body -> Bool Source
isEmptyMatchGroup :: MatchGroup id body -> Bool Source
isSingletonMatchGroup :: MatchGroup id body -> Bool Source
Is there only one RHS in this group?
matchGroupArity :: MatchGroup id body -> Arity Source
hsLMatchPats :: LMatch id body -> [LPat id] Source
GRHSs are used both for pattern bindings and for Matches
Constructors
GRHSs | |
Fields
|
Guarded Right Hand Side.
Constructors
GRHS [GuardLStmt id] body |
pprMatches :: (OutputableBndr idL, OutputableBndr idR, Outputable body) => HsMatchContext idL -> MatchGroup idR body -> SDoc Source
pprFunBind :: (OutputableBndr idL, OutputableBndr idR, Outputable body) => idL -> MatchGroup idR body -> SDoc Source
pprPatBind :: forall bndr id body. (OutputableBndr bndr, OutputableBndr id, Outputable body) => LPat bndr -> GRHSs id body -> SDoc Source
pprMatch :: (OutputableBndr idL, OutputableBndr idR, Outputable body) => HsMatchContext idL -> Match idR body -> SDoc Source
pprGRHSs :: (OutputableBndr idR, Outputable body) => HsMatchContext idL -> GRHSs idR body -> SDoc Source
pprGRHS :: (OutputableBndr idR, Outputable body) => HsMatchContext idL -> GRHS idR body -> SDoc Source
pp_rhs :: Outputable body => HsMatchContext idL -> body -> SDoc Source
type GuardLStmt id = LStmt id (LHsExpr id) Source
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) | |
ApplicativeStmt [(SyntaxExpr idR, ApplicativeArg idL idR)] (Maybe (SyntaxExpr idR)) (PostTc idR Type) |
For full details, see Note [ApplicativeDo] in RnExpr |
BodyStmt body (SyntaxExpr idR) (SyntaxExpr idR) (PostTc idR Type) | |
LetStmt (Located (HsLocalBindsLR idL idR)) |
|
ParStmt [ParStmtBlock idL idR] (SyntaxExpr idR) (SyntaxExpr idR) | |
TransStmt | |
RecStmt | |
Fields
|
Instances
(Data body, DataId idL, DataId idR) => Data (StmtLR idL idR body) | |
(OutputableBndr idL, OutputableBndr idR, Outputable body) => Outputable (StmtLR idL idR body) | |
data ParStmtBlock idL idR Source
Constructors
ParStmtBlock [ExprLStmt idL] [idR] (SyntaxExpr idR) |
Instances
(DataId idL, DataId idR) => Data (ParStmtBlock idL idR) | |
OutputableBndr idL => Outputable (ParStmtBlock idL idR) | |
data ApplicativeArg idL idR Source
Constructors
ApplicativeArgOne (LPat idL) (LHsExpr idL) | |
ApplicativeArgMany [ExprLStmt idL] (SyntaxExpr idL) (LPat idL) |
Instances
(DataId idL, DataId idR) => Data (ApplicativeArg idL idR) | |
pprStmt :: forall idL idR body. (OutputableBndr idL, OutputableBndr idR, Outputable body) => StmtLR idL idR body -> SDoc Source
pprTransformStmt :: OutputableBndr id => [id] -> LHsExpr id -> Maybe (LHsExpr id) -> SDoc Source
pprTransStmt :: Outputable body => Maybe body -> body -> TransForm -> SDoc Source
pprBy :: Outputable body => Maybe body -> SDoc Source
pprDo :: (OutputableBndr id, Outputable body) => HsStmtContext any -> [LStmt id body] -> SDoc Source
ppr_do_stmts :: (OutputableBndr idL, OutputableBndr idR, Outputable body) => [LStmtLR idL idR body] -> SDoc Source
pprComp :: (OutputableBndr id, Outputable body) => [LStmt id body] -> SDoc Source
pprQuals :: (OutputableBndr id, Outputable body) => [LStmt id body] -> SDoc Source
Constructors
HsTypedSplice id (LHsExpr id) | |
HsUntypedSplice id (LHsExpr id) | |
HsQuasiQuote id id SrcSpan FastString |
Instances
DataId id => Data (HsSplice id) | |
OutputableBndr id => Outputable (HsSplice id) | |
isTypedSplice :: HsSplice id -> Bool Source
type SplicePointName = Name Source
data PendingRnSplice Source
Constructors
PendingRnSplice UntypedSpliceFlavour SplicePointName (LHsExpr Name) |
Instances
data UntypedSpliceFlavour Source
Instances
pprPendingSplice :: OutputableBndr id => SplicePointName -> LHsExpr id -> SDoc Source
pprSplice :: OutputableBndr id => HsSplice id -> SDoc Source
ppr_quasi :: OutputableBndr id => id -> id -> FastString -> SDoc Source
ppr_splice :: OutputableBndr id => SDoc -> id -> LHsExpr id -> SDoc Source
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) | |
OutputableBndr id => Outputable (HsBracket id) | |
isTypedBracket :: HsBracket id -> Bool Source
pprHsBracket :: OutputableBndr id => HsBracket id -> SDoc Source
thBrackets :: SDoc -> SDoc -> SDoc Source
thTyBrackets :: SDoc -> SDoc Source
data ArithSeqInfo id Source
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) | |
OutputableBndr id => Outputable (ArithSeqInfo id) | |
data HsMatchContext id Source
Constructors
FunRhs id | |
LambdaExpr | |
CaseAlt | |
IfAlt | |
ProcExpr | |
PatBindRhs | |
RecUpd | |
StmtCtxt (HsStmtContext id) | |
ThPatSplice | |
ThPatQuote | |
PatSyn |
Instances
Data id => Data (HsMatchContext id) | |
data HsStmtContext id Source
Constructors
ListComp | |
MonadComp | |
PArrComp | |
DoExpr | |
MDoExpr | |
ArrowExpr | |
GhciStmtCtxt | |
PatGuard (HsMatchContext id) | |
ParStmtCtxt (HsStmtContext id) | |
TransStmtCtxt (HsStmtContext id) |
Instances
Data id => Data (HsStmtContext id) | |
isListCompExpr :: HsStmtContext id -> Bool Source
isMonadCompExpr :: HsStmtContext id -> Bool Source
matchSeparator :: HsMatchContext id -> SDoc Source
pprMatchContext :: Outputable id => HsMatchContext id -> SDoc Source
pprMatchContextNoun :: Outputable id => HsMatchContext id -> SDoc Source
pprAStmtContext :: Outputable id => HsStmtContext id -> SDoc Source
pprStmtContext :: Outputable id => HsStmtContext id -> SDoc Source
matchContextErrString :: Outputable id => HsMatchContext id -> SDoc Source
pprMatchInCtxt :: (OutputableBndr idL, OutputableBndr idR, Outputable body) => HsMatchContext idL -> Match idR body -> SDoc Source
pprStmtInCtxt :: (OutputableBndr idL, OutputableBndr idR, Outputable body) => HsStmtContext idL -> StmtLR idL idR body -> SDoc Source