Safe Haskell | None |
---|---|
Language | Haskell2010 |
Abstract Haskell syntax for expressions.
Synopsis
- type LHsExpr p = Located (HsExpr p)
- type PostTcExpr = HsExpr GhcTc
- type PostTcTable = [(Name, PostTcExpr)]
- noPostTcExpr :: PostTcExpr
- noPostTcTable :: PostTcTable
- data SyntaxExpr p = SyntaxExpr {
- syn_expr :: HsExpr p
- syn_arg_wraps :: [HsWrapper]
- syn_res_wrap :: HsWrapper
- noExpr :: SourceTextX p => HsExpr p
- noSyntaxExpr :: SourceTextX p => SyntaxExpr p
- mkRnSyntaxExpr :: Name -> SyntaxExpr GhcRn
- type CmdSyntaxTable p = [(Name, HsExpr p)]
- data UnboundVar
- unboundVarOcc :: UnboundVar -> OccName
- data HsExpr p
- = HsVar (Located (IdP p))
- | HsUnboundVar UnboundVar
- | HsConLikeOut ConLike
- | HsRecFld (AmbiguousFieldOcc p)
- | HsOverLabel (Maybe (IdP p)) FastString
- | HsIPVar HsIPName
- | HsOverLit (HsOverLit p)
- | HsLit (HsLit p)
- | HsLam (MatchGroup p (LHsExpr p))
- | HsLamCase (MatchGroup p (LHsExpr p))
- | HsApp (LHsExpr p) (LHsExpr p)
- | HsAppType (LHsExpr p) (LHsWcType p)
- | HsAppTypeOut (LHsExpr p) (LHsWcType GhcRn)
- | OpApp (LHsExpr p) (LHsExpr p) (PostRn p Fixity) (LHsExpr p)
- | NegApp (LHsExpr p) (SyntaxExpr p)
- | HsPar (LHsExpr p)
- | SectionL (LHsExpr p) (LHsExpr p)
- | SectionR (LHsExpr p) (LHsExpr p)
- | ExplicitTuple [LHsTupArg p] Boxity
- | ExplicitSum ConTag Arity (LHsExpr p) (PostTc p [Type])
- | 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)]
- | HsLet (LHsLocalBinds p) (LHsExpr p)
- | HsDo (HsStmtContext Name) (Located [ExprLStmt p]) (PostTc p Type)
- | ExplicitList (PostTc p Type) (Maybe (SyntaxExpr p)) [LHsExpr p]
- | ExplicitPArr (PostTc p Type) [LHsExpr p]
- | RecordCon {
- rcon_con_name :: Located (IdP p)
- rcon_con_like :: PostTc p ConLike
- rcon_con_expr :: PostTcExpr
- rcon_flds :: HsRecordBinds p
- | RecordUpd { }
- | ExprWithTySig (LHsExpr p) (LHsSigWcType p)
- | ExprWithTySigOut (LHsExpr p) (LHsSigWcType GhcRn)
- | ArithSeq PostTcExpr (Maybe (SyntaxExpr p)) (ArithSeqInfo p)
- | PArrSeq PostTcExpr (ArithSeqInfo p)
- | 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)
- | 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)
- type LHsTupArg id = Located (HsTupArg id)
- data HsTupArg id
- tupArgPresent :: LHsTupArg id -> Bool
- pprLExpr :: (SourceTextX p, OutputableBndrId p) => LHsExpr p -> SDoc
- pprExpr :: (SourceTextX p, OutputableBndrId p) => HsExpr p -> SDoc
- isQuietHsExpr :: HsExpr id -> Bool
- pprBinds :: (SourceTextX idL, SourceTextX idR, OutputableBndrId idL, OutputableBndrId idR) => HsLocalBindsLR idL idR -> SDoc
- ppr_lexpr :: (SourceTextX p, OutputableBndrId p) => LHsExpr p -> SDoc
- ppr_expr :: forall p. (SourceTextX p, OutputableBndrId p) => HsExpr p -> SDoc
- data LHsWcTypeX = (SourceTextX p, OutputableBndrId p) => LHsWcTypeX (LHsWcType p)
- ppr_apps :: (SourceTextX p, OutputableBndrId p) => HsExpr p -> [Either (LHsExpr p) LHsWcTypeX] -> SDoc
- pprExternalSrcLoc :: (StringLiteral, (Int, Int), (Int, Int)) -> SDoc
- pprDebugParendExpr :: (SourceTextX p, OutputableBndrId p) => LHsExpr p -> SDoc
- pprParendLExpr :: (SourceTextX p, OutputableBndrId p) => LHsExpr p -> SDoc
- pprParendExpr :: (SourceTextX p, OutputableBndrId p) => HsExpr p -> 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) LexicalFixity (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 (LHsLocalBinds id) (LHsCmd id)
- | HsCmdDo (Located [CmdLStmt id]) (PostTc id Type)
- | HsCmdWrap HsWrapper (HsCmd id)
- data HsArrAppType
- type LHsCmdTop p = Located (HsCmdTop p)
- data HsCmdTop p = HsCmdTop (LHsCmd p) (PostTc p Type) (PostTc p Type) (CmdSyntaxTable p)
- pprLCmd :: (SourceTextX p, OutputableBndrId p) => LHsCmd p -> SDoc
- pprCmd :: (SourceTextX p, OutputableBndrId p) => HsCmd p -> SDoc
- isQuietHsCmd :: HsCmd id -> Bool
- ppr_lcmd :: (SourceTextX p, OutputableBndrId p) => LHsCmd p -> SDoc
- ppr_cmd :: forall p. (SourceTextX p, OutputableBndrId p) => HsCmd p -> SDoc
- pprCmdArg :: (SourceTextX p, OutputableBndrId p) => HsCmdTop p -> SDoc
- type HsRecordBinds p = HsRecFields p (LHsExpr p)
- data MatchGroup p body = MG {}
- type LMatch id body = Located (Match id body)
- data Match p body = Match {
- m_ctxt :: HsMatchContext (NameOrRdrName (IdP p))
- m_pats :: [LPat p]
- m_grhss :: GRHSs p body
- isInfixMatch :: Match id body -> Bool
- isEmptyMatchGroup :: MatchGroup id body -> Bool
- isSingletonMatchGroup :: [LMatch id body] -> Bool
- matchGroupArity :: MatchGroup id body -> Arity
- hsLMatchPats :: LMatch id body -> [LPat id]
- data GRHSs p body = GRHSs {
- grhssGRHSs :: [LGRHS p body]
- grhssLocalBinds :: LHsLocalBinds p
- type LGRHS id body = Located (GRHS id body)
- data GRHS id body = GRHS [GuardLStmt id] body
- pprMatches :: (SourceTextX idR, OutputableBndrId idR, Outputable body) => MatchGroup idR body -> SDoc
- pprFunBind :: (SourceTextX idR, OutputableBndrId idR, Outputable body) => MatchGroup idR body -> SDoc
- pprPatBind :: forall bndr p body. (SourceTextX p, SourceTextX bndr, OutputableBndrId bndr, OutputableBndrId p, Outputable body) => LPat bndr -> GRHSs p body -> SDoc
- pprMatch :: (SourceTextX idR, OutputableBndrId idR, Outputable body) => Match idR body -> SDoc
- pprGRHSs :: (SourceTextX idR, OutputableBndrId idR, Outputable body) => HsMatchContext idL -> GRHSs idR body -> SDoc
- pprGRHS :: (SourceTextX idR, OutputableBndrId 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) (PostTc idR Type)
- | ApplicativeStmt [(SyntaxExpr idR, ApplicativeArg idL idR)] (Maybe (SyntaxExpr idR)) (PostTc idR Type)
- | 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 { }
- | RecStmt {
- recS_stmts :: [LStmtLR idL idR body]
- recS_later_ids :: [IdP idR]
- recS_rec_ids :: [IdP idR]
- recS_bind_fn :: SyntaxExpr idR
- recS_ret_fn :: SyntaxExpr idR
- recS_mfix_fn :: SyntaxExpr idR
- recS_bind_ty :: PostTc idR Type
- recS_later_rets :: [PostTcExpr]
- recS_rec_rets :: [PostTcExpr]
- recS_ret_ty :: PostTc idR Type
- data TransForm
- data ParStmtBlock idL idR = ParStmtBlock [ExprLStmt idL] [IdP idR] (SyntaxExpr idR)
- data ApplicativeArg idL idR
- = ApplicativeArgOne (LPat idL) (LHsExpr idL) Bool
- | ApplicativeArgMany [ExprLStmt idL] (HsExpr idL) (LPat idL)
- pprStmt :: forall idL idR body. (SourceTextX idL, SourceTextX idR, OutputableBndrId idL, OutputableBndrId idR, Outputable body) => StmtLR idL idR body -> SDoc
- pprTransformStmt :: (SourceTextX p, OutputableBndrId p) => [IdP p] -> LHsExpr p -> Maybe (LHsExpr p) -> SDoc
- pprTransStmt :: Outputable body => Maybe body -> body -> TransForm -> SDoc
- pprBy :: Outputable body => Maybe body -> SDoc
- pprDo :: (SourceTextX p, OutputableBndrId p, Outputable body) => HsStmtContext any -> [LStmt p body] -> SDoc
- ppr_do_stmts :: (SourceTextX idL, SourceTextX idR, OutputableBndrId idL, OutputableBndrId idR, Outputable body) => [LStmtLR idL idR body] -> SDoc
- pprComp :: (SourceTextX p, OutputableBndrId p, Outputable body) => [LStmt p body] -> SDoc
- pprQuals :: (SourceTextX p, OutputableBndrId p, Outputable body) => [LStmt p body] -> SDoc
- data HsSplice id
- = HsTypedSplice SpliceDecoration (IdP id) (LHsExpr id)
- | HsUntypedSplice SpliceDecoration (IdP id) (LHsExpr id)
- | HsQuasiQuote (IdP id) (IdP id) SrcSpan FastString
- | HsSpliced ThModFinalizers (HsSplicedThing id)
- data SpliceDecoration
- isTypedSplice :: HsSplice id -> Bool
- newtype ThModFinalizers = ThModFinalizers [ForeignRef (Q ())]
- data HsSplicedThing id
- = HsSplicedExpr (HsExpr id)
- | HsSplicedTy (HsType id)
- | HsSplicedPat (Pat id)
- type SplicePointName = Name
- data PendingRnSplice = PendingRnSplice UntypedSpliceFlavour SplicePointName (LHsExpr GhcRn)
- data UntypedSpliceFlavour
- data PendingTcSplice = PendingTcSplice SplicePointName (LHsExpr GhcTc)
- pprPendingSplice :: (SourceTextX p, OutputableBndrId p) => SplicePointName -> LHsExpr p -> SDoc
- pprSpliceDecl :: (SourceTextX p, OutputableBndrId p) => HsSplice p -> SpliceExplicitFlag -> SDoc
- ppr_splice_decl :: (SourceTextX p, OutputableBndrId p) => HsSplice p -> SDoc
- pprSplice :: (SourceTextX p, OutputableBndrId p) => HsSplice p -> SDoc
- ppr_quasi :: OutputableBndr p => p -> p -> FastString -> SDoc
- ppr_splice :: (SourceTextX p, OutputableBndrId p) => SDoc -> IdP p -> LHsExpr p -> SDoc -> SDoc
- data HsBracket p
- isTypedBracket :: HsBracket id -> Bool
- pprHsBracket :: (SourceTextX p, OutputableBndrId p) => HsBracket p -> SDoc
- thBrackets :: SDoc -> SDoc -> SDoc
- thTyBrackets :: SDoc -> SDoc
- data ArithSeqInfo id
- pp_dotdot :: SDoc
- data HsMatchContext id
- = FunRhs { }
- | LambdaExpr
- | CaseAlt
- | IfAlt
- | ProcExpr
- | PatBindRhs
- | RecUpd
- | StmtCtxt (HsStmtContext id)
- | ThPatSplice
- | ThPatQuote
- | PatSyn
- isPatSynCtxt :: HsMatchContext id -> Bool
- 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
- isMonadFailStmtContext :: HsStmtContext id -> Bool
- matchSeparator :: HsMatchContext id -> SDoc
- pprMatchContext :: (Outputable (NameOrRdrName id), Outputable id) => HsMatchContext id -> SDoc
- pprMatchContextNoun :: (Outputable (NameOrRdrName id), Outputable id) => HsMatchContext id -> SDoc
- pprAStmtContext :: (Outputable id, Outputable (NameOrRdrName id)) => HsStmtContext id -> SDoc
- pprStmtContext :: (Outputable id, Outputable (NameOrRdrName id)) => HsStmtContext id -> SDoc
- matchContextErrString :: Outputable id => HsMatchContext id -> SDoc
- pprMatchInCtxt :: (SourceTextX idR, OutputableBndrId idR, Outputable (NameOrRdrName (NameOrRdrName (IdP idR))), Outputable body) => Match idR body -> SDoc
- pprStmtInCtxt :: (SourceTextX idL, SourceTextX idR, OutputableBndrId idL, OutputableBndrId idR, Outputable body) => HsStmtContext (IdP idL) -> StmtLR idL idR body -> SDoc
Expressions proper
= Located (HsExpr p) | May have |
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.)
SyntaxExpr | |
|
Instances
DataId p => Data (SyntaxExpr p) Source # | |
Defined in HsExpr gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SyntaxExpr p -> c (SyntaxExpr p) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (SyntaxExpr p) # toConstr :: SyntaxExpr p -> Constr # dataTypeOf :: SyntaxExpr p -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (SyntaxExpr p)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (SyntaxExpr p)) # gmapT :: (forall b. Data b => b -> b) -> SyntaxExpr p -> SyntaxExpr p # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SyntaxExpr p -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SyntaxExpr p -> r # gmapQ :: (forall d. Data d => d -> u) -> SyntaxExpr p -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SyntaxExpr p -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SyntaxExpr p -> m (SyntaxExpr p) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SyntaxExpr p -> m (SyntaxExpr p) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SyntaxExpr p -> m (SyntaxExpr p) # | |
(SourceTextX p, OutputableBndrId p) => Outputable (SyntaxExpr p) Source # | |
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)
noSyntaxExpr :: SourceTextX p => SyntaxExpr p Source #
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
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 # | |
Defined in HsExpr 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 # | |
unboundVarOcc :: UnboundVar -> OccName Source #
A Haskell expression.
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)
|
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 |
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 |
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. |
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) |
|
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 # | |
Defined in HsExpr gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsExpr p -> c (HsExpr p) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsExpr p) # toConstr :: HsExpr p -> Constr # dataTypeOf :: HsExpr p -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsExpr p)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsExpr p)) # gmapT :: (forall b. Data b => b -> b) -> HsExpr p -> HsExpr p # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsExpr p -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsExpr p -> r # gmapQ :: (forall d. Data d => d -> u) -> HsExpr p -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsExpr p -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsExpr p -> m (HsExpr p) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsExpr p -> m (HsExpr p) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsExpr p -> m (HsExpr p) # | |
(SourceTextX p, OutputableBndrId p) => Outputable (HsExpr p) 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))
Haskell Tuple Argument
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 # | |
Defined in HsExpr 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) # |
tupArgPresent :: LHsTupArg id -> Bool Source #
pprLExpr :: (SourceTextX p, OutputableBndrId p) => LHsExpr p -> SDoc Source #
pprExpr :: (SourceTextX p, OutputableBndrId p) => HsExpr p -> SDoc Source #
isQuietHsExpr :: HsExpr id -> Bool Source #
pprBinds :: (SourceTextX idL, SourceTextX idR, OutputableBndrId idL, OutputableBndrId idR) => HsLocalBindsLR idL idR -> SDoc Source #
ppr_lexpr :: (SourceTextX p, OutputableBndrId p) => LHsExpr p -> SDoc Source #
ppr_expr :: forall p. (SourceTextX p, OutputableBndrId p) => HsExpr p -> SDoc Source #
data LHsWcTypeX Source #
Located Haskell Wildcard Type Expression
(SourceTextX p, OutputableBndrId p) => LHsWcTypeX (LHsWcType p) |
ppr_apps :: (SourceTextX p, OutputableBndrId p) => HsExpr p -> [Either (LHsExpr p) LHsWcTypeX] -> SDoc Source #
pprExternalSrcLoc :: (StringLiteral, (Int, Int), (Int, Int)) -> SDoc Source #
pprDebugParendExpr :: (SourceTextX p, OutputableBndrId p) => LHsExpr p -> SDoc Source #
pprParendLExpr :: (SourceTextX p, OutputableBndrId p) => LHsExpr p -> SDoc Source #
pprParendExpr :: (SourceTextX p, OutputableBndrId p) => HsExpr p -> SDoc Source #
hsExprNeedsParens :: HsExpr id -> Bool Source #
isAtomicHsExpr :: HsExpr id -> Bool Source #
Haskell Command (e.g. a "statement" in an Arrow proc block)
HsCmdArrApp (LHsExpr id) (LHsExpr id) (PostTc id Type) HsArrAppType Bool | |
HsCmdArrForm (LHsExpr id) LexicalFixity (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 (LHsLocalBinds id) (LHsCmd id) |
|
HsCmdDo (Located [CmdLStmt id]) (PostTc id Type) | |
HsCmdWrap HsWrapper (HsCmd id) |
Instances
DataId id => Data (HsCmd id) Source # | |
Defined in HsExpr 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) # | |
(SourceTextX p, OutputableBndrId p) => Outputable (HsCmd p) Source # | |
data HsArrAppType Source #
Haskell Array Application Type
Instances
Data HsArrAppType Source # | |
Defined in HsExpr 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 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
Haskell Top-level Command
Instances
DataId p => Data (HsCmdTop p) Source # | |
Defined in HsExpr gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsCmdTop p -> c (HsCmdTop p) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsCmdTop p) # toConstr :: HsCmdTop p -> Constr # dataTypeOf :: HsCmdTop p -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsCmdTop p)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsCmdTop p)) # gmapT :: (forall b. Data b => b -> b) -> HsCmdTop p -> HsCmdTop p # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsCmdTop p -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsCmdTop p -> r # gmapQ :: (forall d. Data d => d -> u) -> HsCmdTop p -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsCmdTop p -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsCmdTop p -> m (HsCmdTop p) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsCmdTop p -> m (HsCmdTop p) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsCmdTop p -> m (HsCmdTop p) # | |
(SourceTextX p, OutputableBndrId p) => Outputable (HsCmdTop p) Source # | |
pprLCmd :: (SourceTextX p, OutputableBndrId p) => LHsCmd p -> SDoc Source #
pprCmd :: (SourceTextX p, OutputableBndrId p) => HsCmd p -> SDoc Source #
isQuietHsCmd :: HsCmd id -> Bool Source #
ppr_lcmd :: (SourceTextX p, OutputableBndrId p) => LHsCmd p -> SDoc Source #
ppr_cmd :: forall p. (SourceTextX p, OutputableBndrId p) => HsCmd p -> SDoc Source #
pprCmdArg :: (SourceTextX p, OutputableBndrId p) => HsCmdTop p -> SDoc Source #
type HsRecordBinds p = HsRecFields p (LHsExpr p) Source #
Haskell Record Bindings
data MatchGroup p body Source #
Instances
(Data body, DataId p) => Data (MatchGroup p body) Source # | |
Defined in HsExpr gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MatchGroup p body -> c (MatchGroup p body) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (MatchGroup p body) # toConstr :: MatchGroup p body -> Constr # dataTypeOf :: MatchGroup p body -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (MatchGroup p body)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (MatchGroup p body)) # gmapT :: (forall b. Data b => b -> b) -> MatchGroup p body -> MatchGroup p body # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroup p body -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroup p body -> r # gmapQ :: (forall d. Data d => d -> u) -> MatchGroup p body -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> MatchGroup p body -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> MatchGroup p body -> m (MatchGroup p body) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroup p body -> m (MatchGroup p body) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroup p body -> m (MatchGroup p body) # |
type LMatch id body = Located (Match id body) Source #
Located Match
May have AnnKeywordId
: AnnSemi
when in a
list
Match | |
|
Instances
(Data body, DataId p) => Data (Match p body) Source # | |
Defined in HsExpr gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Match p body -> c (Match p body) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Match p body) # toConstr :: Match p body -> Constr # dataTypeOf :: Match p body -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Match p body)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Match p body)) # gmapT :: (forall b. Data b => b -> b) -> Match p body -> Match p body # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Match p body -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Match p body -> r # gmapQ :: (forall d. Data d => d -> u) -> Match p body -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Match p body -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Match p body -> m (Match p body) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Match p body -> m (Match p body) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Match p body -> m (Match p body) # | |
(SourceTextX idR, OutputableBndrId idR, Outputable body) => Outputable (Match idR body) Source # | |
isInfixMatch :: Match id body -> Bool Source #
isEmptyMatchGroup :: MatchGroup id body -> Bool Source #
isSingletonMatchGroup :: [LMatch id body] -> Bool Source #
Is there only one RHS in this list of matches?
matchGroupArity :: MatchGroup id body -> Arity Source #
hsLMatchPats :: LMatch id body -> [LPat id] Source #
Guarded Right-Hand Sides
GRHSs are used both for pattern bindings and for Matches
GRHSs | |
|
Instances
(Data body, DataId p) => Data (GRHSs p body) Source # | |
Defined in HsExpr gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GRHSs p body -> c (GRHSs p body) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GRHSs p body) # toConstr :: GRHSs p body -> Constr # dataTypeOf :: GRHSs p body -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GRHSs p body)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GRHSs p body)) # gmapT :: (forall b. Data b => b -> b) -> GRHSs p body -> GRHSs p body # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GRHSs p body -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GRHSs p body -> r # gmapQ :: (forall d. Data d => d -> u) -> GRHSs p body -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> GRHSs p body -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GRHSs p body -> m (GRHSs p body) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHSs p body -> m (GRHSs p body) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHSs p body -> m (GRHSs p body) # |
Guarded Right Hand Side.
GRHS [GuardLStmt id] body |
Instances
(Data body, DataId id) => Data (GRHS id body) Source # | |
Defined in HsExpr 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) # |
pprMatches :: (SourceTextX idR, OutputableBndrId idR, Outputable body) => MatchGroup idR body -> SDoc Source #
pprFunBind :: (SourceTextX idR, OutputableBndrId idR, Outputable body) => MatchGroup idR body -> SDoc 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 LStmtLR idL idR body = Located (StmtLR idL idR body) Source #
Located Statement with separate Left and Right id's
type GuardLStmt id = LStmt id (LHsExpr id) Source #
Guard Located Statement
data StmtLR idL idR body Source #
API Annotations when in qualifier lists or guards
- AnnKeywordId
: AnnVbar
,
AnnComma
,AnnThen
,
AnnBy
,AnnBy
,
AnnGroup
,AnnUsing
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) |
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 | |
RecStmt | |
|
Instances
(Data body, DataId idL, DataId idR) => Data (StmtLR idL idR body) Source # | |
Defined in HsExpr 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) # | |
(SourceTextX idL, SourceTextX idR, OutputableBndrId idL, OutputableBndrId idR, Outputable body) => Outputable (StmtLR idL idR body) Source # | |
Instances
Data TransForm Source # | |
Defined in HsExpr 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
ParStmtBlock [ExprLStmt idL] [IdP idR] (SyntaxExpr idR) |
Instances
(DataId idL, DataId idR) => Data (ParStmtBlock idL idR) Source # | |
Defined in HsExpr 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) # | |
(SourceTextX idL, OutputableBndrId idL) => Outputable (ParStmtBlock idL idR) Source # | |
data ApplicativeArg idL idR Source #
Applicative Argument
ApplicativeArgOne (LPat idL) (LHsExpr idL) Bool | |
ApplicativeArgMany [ExprLStmt idL] (HsExpr idL) (LPat idL) |
Instances
(DataId idL, DataId idR) => Data (ApplicativeArg idL idR) Source # | |
Defined in HsExpr 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. (SourceTextX idL, SourceTextX idR, OutputableBndrId idL, OutputableBndrId idR, Outputable body) => StmtLR idL idR body -> SDoc Source #
pprTransformStmt :: (SourceTextX p, OutputableBndrId p) => [IdP p] -> LHsExpr p -> Maybe (LHsExpr p) -> SDoc Source #
pprTransStmt :: Outputable body => Maybe body -> body -> TransForm -> SDoc Source #
pprDo :: (SourceTextX p, OutputableBndrId p, Outputable body) => HsStmtContext any -> [LStmt p body] -> SDoc Source #
ppr_do_stmts :: (SourceTextX idL, SourceTextX idR, OutputableBndrId idL, OutputableBndrId idR, Outputable body) => [LStmtLR idL idR body] -> SDoc Source #
pprComp :: (SourceTextX p, OutputableBndrId p, Outputable body) => [LStmt p body] -> SDoc Source #
pprQuals :: (SourceTextX p, OutputableBndrId p, Outputable body) => [LStmt p body] -> SDoc Source #
Haskell Splice
HsTypedSplice SpliceDecoration (IdP id) (LHsExpr id) | |
HsUntypedSplice SpliceDecoration (IdP id) (LHsExpr id) | |
HsQuasiQuote (IdP id) (IdP id) SrcSpan FastString | |
HsSpliced ThModFinalizers (HsSplicedThing id) |
Instances
DataId id => Data (HsSplice id) Source # | |
Defined in HsExpr 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) # | |
(SourceTextX p, OutputableBndrId p) => Outputable (HsSplice p) 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.
Instances
isTypedSplice :: HsSplice id -> Bool 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.
ThModFinalizers [ForeignRef (Q ())] |
Instances
Data ThModFinalizers Source # | |
Defined in HsExpr 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.
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 # | |
Defined in HsExpr 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) # | |
(SourceTextX p, OutputableBndrId p) => Outputable (HsSplicedThing p) Source # | |
type SplicePointName = Name Source #
data PendingRnSplice Source #
Pending Renamer Splice
Instances
Data PendingRnSplice Source # | |
Defined in HsExpr 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 # | |
Defined in HsExpr 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 # | |
Defined in HsExpr 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 # | |
pprPendingSplice :: (SourceTextX p, OutputableBndrId p) => SplicePointName -> LHsExpr p -> SDoc Source #
pprSpliceDecl :: (SourceTextX p, OutputableBndrId p) => HsSplice p -> SpliceExplicitFlag -> SDoc Source #
ppr_splice_decl :: (SourceTextX p, OutputableBndrId p) => HsSplice p -> SDoc Source #
pprSplice :: (SourceTextX p, OutputableBndrId p) => HsSplice p -> SDoc Source #
ppr_quasi :: OutputableBndr p => p -> p -> FastString -> SDoc Source #
ppr_splice :: (SourceTextX p, OutputableBndrId p) => SDoc -> IdP p -> LHsExpr p -> SDoc -> SDoc Source #
Haskell Bracket
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 # | |
Defined in HsExpr gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsBracket p -> c (HsBracket p) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsBracket p) # toConstr :: HsBracket p -> Constr # dataTypeOf :: HsBracket p -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsBracket p)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsBracket p)) # gmapT :: (forall b. Data b => b -> b) -> HsBracket p -> HsBracket p # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsBracket p -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsBracket p -> r # gmapQ :: (forall d. Data d => d -> u) -> HsBracket p -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsBracket p -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsBracket p -> m (HsBracket p) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsBracket p -> m (HsBracket p) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsBracket p -> m (HsBracket p) # | |
(SourceTextX p, OutputableBndrId p) => Outputable (HsBracket p) Source # | |
isTypedBracket :: HsBracket id -> Bool Source #
pprHsBracket :: (SourceTextX p, OutputableBndrId p) => HsBracket p -> SDoc Source #
thTyBrackets :: SDoc -> SDoc Source #
data ArithSeqInfo id Source #
Arithmetic Sequence Information
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 # | |
Defined in HsExpr 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) # | |
(SourceTextX p, OutputableBndrId p) => Outputable (ArithSeqInfo p) 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].
FunRhs | A pattern matching on an argument of a function binding |
| |
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 # | |
Defined in HsExpr fmap :: (a -> b) -> HsMatchContext a -> HsMatchContext b # (<$) :: a -> HsMatchContext b -> HsMatchContext a # | |
Data id => Data (HsMatchContext id) Source # | |
Defined in HsExpr 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 # | |
isPatSynCtxt :: HsMatchContext id -> Bool Source #
data HsStmtContext id Source #
Haskell Statement Context. It expects to be parameterised with one of
RdrName
, Name
or Id
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 # | |
Defined in HsExpr fmap :: (a -> b) -> HsStmtContext a -> HsStmtContext b # (<$) :: a -> HsStmtContext b -> HsStmtContext a # | |
Data id => Data (HsStmtContext id) Source # | |
Defined in HsExpr 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 p, Outputable (NameOrRdrName p)) => Outputable (HsStmtContext p) Source # | |
isListCompExpr :: HsStmtContext id -> Bool Source #
isMonadCompExpr :: HsStmtContext id -> Bool Source #
isMonadFailStmtContext :: HsStmtContext id -> Bool Source #
Should pattern match failure in a HsStmtContext
be desugared using
MonadFail
?
matchSeparator :: HsMatchContext id -> SDoc Source #
pprMatchContext :: (Outputable (NameOrRdrName id), Outputable id) => HsMatchContext id -> SDoc Source #
pprMatchContextNoun :: (Outputable (NameOrRdrName id), Outputable id) => HsMatchContext id -> SDoc Source #
pprAStmtContext :: (Outputable id, Outputable (NameOrRdrName id)) => HsStmtContext id -> SDoc Source #
pprStmtContext :: (Outputable id, Outputable (NameOrRdrName id)) => HsStmtContext id -> SDoc Source #
matchContextErrString :: Outputable id => HsMatchContext id -> SDoc Source #
pprMatchInCtxt :: (SourceTextX idR, OutputableBndrId idR, Outputable (NameOrRdrName (NameOrRdrName (IdP idR))), Outputable body) => Match idR body -> SDoc Source #
pprStmtInCtxt :: (SourceTextX idL, SourceTextX idR, OutputableBndrId idL, OutputableBndrId idR, Outputable body) => HsStmtContext (IdP idL) -> StmtLR idL idR body -> SDoc Source #