HsExpr

ghc-8.6.3: The GHC API

Safe Haskell | None
Language | Haskell2010

HsExpr

Contents

- Expressions proper

Description

Abstract Haskell syntax for expressions.

Synopsis

- type LHsExpr p = Located (HsExpr p)
- type PostTcExpr = HsExpr GhcTc
- type PostTcTable = [(Name, PostTcExpr)]
- data SyntaxExpr p = SyntaxExpr {
  - syn_expr :: HsExpr p
  - syn_arg_wraps :: [HsWrapper]
  - syn_res_wrap :: HsWrapper
  }
- noExpr :: HsExpr (GhcPass p)
- noSyntaxExpr :: SyntaxExpr (GhcPass p)
- mkRnSyntaxExpr :: Name -> SyntaxExpr GhcRn
- type CmdSyntaxTable p = [(Name, HsExpr p)]
- data UnboundVar
  - = OutOfScope OccName GlobalRdrEnv
  - | TrueExprHole OccName
- unboundVarOcc :: UnboundVar -> OccName
- data HsExpr p
  - = HsVar (XVar p) (Located (IdP p))
  - | HsUnboundVar (XUnboundVar p) UnboundVar
  - | HsConLikeOut (XConLikeOut p) ConLike
  - | HsRecFld (XRecFld p) (AmbiguousFieldOcc p)
  - | HsOverLabel (XOverLabel p) (Maybe (IdP p)) FastString
  - | HsIPVar (XIPVar p) HsIPName
  - | HsOverLit (XOverLitE p) (HsOverLit p)
  - | HsLit (XLitE p) (HsLit p)
  - | HsLam (XLam p) (MatchGroup p (LHsExpr p))
  - | HsLamCase (XLamCase p) (MatchGroup p (LHsExpr p))
  - | HsApp (XApp p) (LHsExpr p) (LHsExpr p)
  - | HsAppType (XAppTypeE p) (LHsExpr p)
  - | OpApp (XOpApp p) (LHsExpr p) (LHsExpr p) (LHsExpr p)
  - | NegApp (XNegApp p) (LHsExpr p) (SyntaxExpr p)
  - | HsPar (XPar p) (LHsExpr p)
  - | SectionL (XSectionL p) (LHsExpr p) (LHsExpr p)
  - | SectionR (XSectionR p) (LHsExpr p) (LHsExpr p)
  - | ExplicitTuple (XExplicitTuple p) [LHsTupArg p] Boxity
  - | ExplicitSum (XExplicitSum p) ConTag Arity (LHsExpr p)
  - | HsCase (XCase p) (LHsExpr p) (MatchGroup p (LHsExpr p))
  - | HsIf (XIf p) (Maybe (SyntaxExpr p)) (LHsExpr p) (LHsExpr p) (LHsExpr p)
  - | HsMultiIf (XMultiIf p) [LGRHS p (LHsExpr p)]
  - | HsLet (XLet p) (LHsLocalBinds p) (LHsExpr p)
  - | HsDo (XDo p) (HsStmtContext Name) (Located [ExprLStmt p])
  - | ExplicitList (XExplicitList p) (Maybe (SyntaxExpr p)) [LHsExpr p]
  - | RecordCon {
    - rcon_ext :: XRecordCon p
    - rcon_con_name :: Located (IdP p)
    - rcon_flds :: HsRecordBinds p
    }
  - | RecordUpd {
    - rupd_ext :: XRecordUpd p
    - rupd_expr :: LHsExpr p
    - rupd_flds :: [LHsRecUpdField p]
    }
  - | ExprWithTySig (XExprWithTySig p) (LHsExpr p)
  - | ArithSeq (XArithSeq p) (Maybe (SyntaxExpr p)) (ArithSeqInfo p)
  - | HsSCC (XSCC p) SourceText StringLiteral (LHsExpr p)
  - | HsCoreAnn (XCoreAnn p) SourceText StringLiteral (LHsExpr p)
  - | HsBracket (XBracket p) (HsBracket p)
  - | HsRnBracketOut (XRnBracketOut p) (HsBracket GhcRn) [PendingRnSplice]
  - | HsTcBracketOut (XTcBracketOut p) (HsBracket GhcRn) [PendingTcSplice]
  - | HsSpliceE (XSpliceE p) (HsSplice p)
  - | HsProc (XProc p) (LPat p) (LHsCmdTop p)
  - | HsStatic (XStatic p) (LHsExpr p)
  - | HsArrApp (XArrApp p) (LHsExpr p) (LHsExpr p) HsArrAppType Bool
  - | HsArrForm (XArrForm p) (LHsExpr p) (Maybe Fixity) [LHsCmdTop p]
  - | HsTick (XTick p) (Tickish (IdP p)) (LHsExpr p)
  - | HsBinTick (XBinTick p) Int Int (LHsExpr p)
  - | HsTickPragma (XTickPragma p) SourceText (StringLiteral, (Int, Int), (Int, Int)) ((SourceText, SourceText), (SourceText, SourceText)) (LHsExpr p)
  - | EWildPat (XEWildPat p)
  - | EAsPat (XEAsPat p) (Located (IdP p)) (LHsExpr p)
  - | EViewPat (XEViewPat p) (LHsExpr p) (LHsExpr p)
  - | ELazyPat (XELazyPat p) (LHsExpr p)
  - | HsWrap (XWrap p) HsWrapper (HsExpr p)
  - | XExpr (XXExpr p)
- data RecordConTc = RecordConTc {
  - rcon_con_like :: ConLike
  - rcon_con_expr :: PostTcExpr
  }
- data RecordUpdTc = RecordUpdTc {
  - rupd_cons :: [ConLike]
  - rupd_in_tys :: [Type]
  - rupd_out_tys :: [Type]
  - rupd_wrap :: HsWrapper
  }
- type LHsTupArg id = Located (HsTupArg id)
- data HsTupArg id
  - = Present (XPresent id) (LHsExpr id)
  - | Missing (XMissing id)
  - | XTupArg (XXTupArg id)
- tupArgPresent :: LHsTupArg id -> Bool
- pprLExpr :: OutputableBndrId (GhcPass p) => LHsExpr (GhcPass p) -> SDoc
- pprExpr :: OutputableBndrId (GhcPass p) => HsExpr (GhcPass p) -> SDoc
- isQuietHsExpr :: HsExpr id -> Bool
- pprBinds :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR)) => HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> SDoc
- ppr_lexpr :: OutputableBndrId (GhcPass p) => LHsExpr (GhcPass p) -> SDoc
- ppr_expr :: forall p. OutputableBndrId (GhcPass p) => HsExpr (GhcPass p) -> SDoc
- ppr_apps :: OutputableBndrId (GhcPass p) => HsExpr (GhcPass p) -> [Either (LHsExpr (GhcPass p)) (XAppTypeE (GhcPass p))] -> SDoc
- pprExternalSrcLoc :: (StringLiteral, (Int, Int), (Int, Int)) -> SDoc
- pprDebugParendExpr :: OutputableBndrId (GhcPass p) => PprPrec -> LHsExpr (GhcPass p) -> SDoc
- pprParendLExpr :: OutputableBndrId (GhcPass p) => PprPrec -> LHsExpr (GhcPass p) -> SDoc
- pprParendExpr :: OutputableBndrId (GhcPass p) => PprPrec -> HsExpr (GhcPass p) -> SDoc
- hsExprNeedsParens :: PprPrec -> HsExpr p -> Bool
- parenthesizeHsExpr :: PprPrec -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
- isAtomicHsExpr :: HsExpr id -> Bool
- type LHsCmd id = Located (HsCmd id)
- data HsCmd id
  - = HsCmdArrApp (XCmdArrApp id) (LHsExpr id) (LHsExpr id) HsArrAppType Bool
  - | HsCmdArrForm (XCmdArrForm id) (LHsExpr id) LexicalFixity (Maybe Fixity) [LHsCmdTop id]
  - | HsCmdApp (XCmdApp id) (LHsCmd id) (LHsExpr id)
  - | HsCmdLam (XCmdLam id) (MatchGroup id (LHsCmd id))
  - | HsCmdPar (XCmdPar id) (LHsCmd id)
  - | HsCmdCase (XCmdCase id) (LHsExpr id) (MatchGroup id (LHsCmd id))
  - | HsCmdIf (XCmdIf id) (Maybe (SyntaxExpr id)) (LHsExpr id) (LHsCmd id) (LHsCmd id)
  - | HsCmdLet (XCmdLet id) (LHsLocalBinds id) (LHsCmd id)
  - | HsCmdDo (XCmdDo id) (Located [CmdLStmt id])
  - | HsCmdWrap (XCmdWrap id) HsWrapper (HsCmd id)
  - | XCmd (XXCmd id)
- data HsArrAppType
  - = HsHigherOrderApp
  - | HsFirstOrderApp
- type LHsCmdTop p = Located (HsCmdTop p)
- data HsCmdTop p
  - = HsCmdTop (XCmdTop p) (LHsCmd p)
  - | XCmdTop (XXCmdTop p)
- data CmdTopTc = CmdTopTc Type Type (CmdSyntaxTable GhcTc)
- pprLCmd :: OutputableBndrId (GhcPass p) => LHsCmd (GhcPass p) -> SDoc
- pprCmd :: OutputableBndrId (GhcPass p) => HsCmd (GhcPass p) -> SDoc
- isQuietHsCmd :: HsCmd id -> Bool
- ppr_lcmd :: OutputableBndrId (GhcPass p) => LHsCmd (GhcPass p) -> SDoc
- ppr_cmd :: forall p. OutputableBndrId (GhcPass p) => HsCmd (GhcPass p) -> SDoc
- pprCmdArg :: OutputableBndrId (GhcPass p) => HsCmdTop (GhcPass p) -> SDoc
- type HsRecordBinds p = HsRecFields p (LHsExpr p)
- data MatchGroup p body
  - = MG {
    - mg_ext :: XMG p body
    - mg_alts :: Located [LMatch p body]
    - mg_origin :: Origin
    }
  - | XMatchGroup (XXMatchGroup p body)
- data MatchGroupTc = MatchGroupTc {
  - mg_arg_tys :: [Type]
  - mg_res_ty :: Type
  }
- type LMatch id body = Located (Match id body)
- data Match p body
  - = Match {
    - m_ext :: XCMatch p body
    - m_ctxt :: HsMatchContext (NameOrRdrName (IdP p))
    - m_pats :: [LPat p]
    - m_grhss :: GRHSs p body
    }
  - | XMatch (XXMatch 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 {
    - grhssExt :: XCGRHSs p body
    - grhssGRHSs :: [LGRHS p body]
    - grhssLocalBinds :: LHsLocalBinds p
    }
  - | XGRHSs (XXGRHSs p body)
- type LGRHS id body = Located (GRHS id body)
- data GRHS p body
  - = GRHS (XCGRHS p body) [GuardLStmt p] body
  - | XGRHS (XXGRHS p body)
- pprMatches :: (OutputableBndrId (GhcPass idR), Outputable body) => MatchGroup (GhcPass idR) body -> SDoc
- pprFunBind :: (OutputableBndrId (GhcPass idR), Outputable body) => MatchGroup (GhcPass idR) body -> SDoc
- pprPatBind :: forall bndr p body. (OutputableBndrId (GhcPass bndr), OutputableBndrId (GhcPass p), Outputable body) => LPat (GhcPass bndr) -> GRHSs (GhcPass p) body -> SDoc
- pprMatch :: (OutputableBndrId (GhcPass idR), Outputable body) => Match (GhcPass idR) body -> SDoc
- pprGRHSs :: (OutputableBndrId (GhcPass idR), Outputable body) => HsMatchContext idL -> GRHSs (GhcPass idR) body -> SDoc
- pprGRHS :: (OutputableBndrId (GhcPass idR), Outputable body) => HsMatchContext idL -> GRHS (GhcPass 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 (XLastStmt idL idR body) body Bool (SyntaxExpr idR)
  - | BindStmt (XBindStmt idL idR body) (LPat idL) body (SyntaxExpr idR) (SyntaxExpr idR)
  - | ApplicativeStmt (XApplicativeStmt idL idR body) [(SyntaxExpr idR, ApplicativeArg idL)] (Maybe (SyntaxExpr idR))
  - | BodyStmt (XBodyStmt idL idR body) body (SyntaxExpr idR) (SyntaxExpr idR)
  - | LetStmt (XLetStmt idL idR body) (LHsLocalBindsLR idL idR)
  - | ParStmt (XParStmt idL idR body) [ParStmtBlock idL idR] (HsExpr idR) (SyntaxExpr idR)
  - | TransStmt {
    - trS_ext :: XTransStmt idL idR body
    - trS_form :: TransForm
    - trS_stmts :: [ExprLStmt idL]
    - trS_bndrs :: [(IdP idR, IdP idR)]
    - trS_using :: LHsExpr idR
    - trS_by :: Maybe (LHsExpr idR)
    - trS_ret :: SyntaxExpr idR
    - trS_bind :: SyntaxExpr idR
    - trS_fmap :: HsExpr idR
    }
  - | RecStmt {
    - recS_ext :: XRecStmt idL idR body
    - 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
    }
  - | XStmtLR (XXStmtLR idL idR body)
- data RecStmtTc = RecStmtTc {
  - recS_bind_ty :: Type
  - recS_later_rets :: [PostTcExpr]
  - recS_rec_rets :: [PostTcExpr]
  - recS_ret_ty :: Type
  }
- data TransForm
  - = ThenForm
  - | GroupForm
- data ParStmtBlock idL idR
  - = ParStmtBlock (XParStmtBlock idL idR) [ExprLStmt idL] [IdP idR] (SyntaxExpr idR)
  - | XParStmtBlock (XXParStmtBlock idL idR)
- data ApplicativeArg idL
  - = ApplicativeArgOne (XApplicativeArgOne idL) (LPat idL) (LHsExpr idL) Bool
  - | ApplicativeArgMany (XApplicativeArgMany idL) [ExprLStmt idL] (HsExpr idL) (LPat idL)
  - | XApplicativeArg (XXApplicativeArg idL)
- pprStmt :: forall idL idR body. (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR), Outputable body) => StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc
- pprTransformStmt :: OutputableBndrId (GhcPass p) => [IdP (GhcPass p)] -> LHsExpr (GhcPass p) -> Maybe (LHsExpr (GhcPass p)) -> SDoc
- pprTransStmt :: Outputable body => Maybe body -> body -> TransForm -> SDoc
- pprBy :: Outputable body => Maybe body -> SDoc
- pprDo :: (OutputableBndrId (GhcPass p), Outputable body) => HsStmtContext any -> [LStmt (GhcPass p) body] -> SDoc
- ppr_do_stmts :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR), Outputable body) => [LStmtLR (GhcPass idL) (GhcPass idR) body] -> SDoc
- pprComp :: (OutputableBndrId (GhcPass p), Outputable body) => [LStmt (GhcPass p) body] -> SDoc
- pprQuals :: (OutputableBndrId (GhcPass p), Outputable body) => [LStmt (GhcPass p) body] -> SDoc
- data HsSplice id
  - = HsTypedSplice (XTypedSplice id) SpliceDecoration (IdP id) (LHsExpr id)
  - | HsUntypedSplice (XUntypedSplice id) SpliceDecoration (IdP id) (LHsExpr id)
  - | HsQuasiQuote (XQuasiQuote id) (IdP id) (IdP id) SrcSpan FastString
  - | HsSpliced (XSpliced id) ThModFinalizers (HsSplicedThing id)
  - | XSplice (XXSplice id)
- data SpliceDecoration
  - = HasParens
  - | HasDollar
  - | NoParens
- 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
  - = UntypedExpSplice
  - | UntypedPatSplice
  - | UntypedTypeSplice
  - | UntypedDeclSplice
- data PendingTcSplice = PendingTcSplice SplicePointName (LHsExpr GhcTc)
- pprPendingSplice :: OutputableBndrId (GhcPass p) => SplicePointName -> LHsExpr (GhcPass p) -> SDoc
- pprSpliceDecl :: OutputableBndrId (GhcPass p) => HsSplice (GhcPass p) -> SpliceExplicitFlag -> SDoc
- ppr_splice_decl :: OutputableBndrId (GhcPass p) => HsSplice (GhcPass p) -> SDoc
- pprSplice :: OutputableBndrId (GhcPass p) => HsSplice (GhcPass p) -> SDoc
- ppr_quasi :: OutputableBndr p => p -> p -> FastString -> SDoc
- ppr_splice :: OutputableBndrId (GhcPass p) => SDoc -> IdP (GhcPass p) -> LHsExpr (GhcPass p) -> SDoc -> SDoc
- data HsBracket p
  - = ExpBr (XExpBr p) (LHsExpr p)
  - | PatBr (XPatBr p) (LPat p)
  - | DecBrL (XDecBrL p) [LHsDecl p]
  - | DecBrG (XDecBrG p) (HsGroup p)
  - | TypBr (XTypBr p) (LHsType p)
  - | VarBr (XVarBr p) Bool (IdP p)
  - | TExpBr (XTExpBr p) (LHsExpr p)
  - | XBracket (XXBracket p)
- isTypedBracket :: HsBracket id -> Bool
- pprHsBracket :: OutputableBndrId (GhcPass p) => HsBracket (GhcPass p) -> SDoc
- thBrackets :: SDoc -> SDoc -> SDoc
- thTyBrackets :: SDoc -> SDoc
- data ArithSeqInfo id
  - = From (LHsExpr id)
  - | FromThen (LHsExpr id) (LHsExpr id)
  - | FromTo (LHsExpr id) (LHsExpr id)
  - | FromThenTo (LHsExpr id) (LHsExpr id) (LHsExpr id)
- pp_dotdot :: SDoc
- data HsMatchContext id
  - = FunRhs {
    - mc_fun :: Located id
    - mc_fixity :: LexicalFixity
    - mc_strictness :: SrcStrictness
    }
  - | LambdaExpr
  - | CaseAlt
  - | IfAlt
  - | ProcExpr
  - | PatBindRhs
  - | PatBindGuards
  - | RecUpd
  - | StmtCtxt (HsStmtContext id)
  - | ThPatSplice
  - | ThPatQuote
  - | PatSyn
- isPatSynCtxt :: HsMatchContext id -> Bool
- data HsStmtContext id
  - = ListComp
  - | MonadComp
  - | DoExpr
  - | MDoExpr
  - | ArrowExpr
  - | GhciStmtCtxt
  - | PatGuard (HsMatchContext id)
  - | ParStmtCtxt (HsStmtContext id)
  - | TransStmtCtxt (HsStmtContext id)
- isListCompExpr :: 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 :: (OutputableBndrId (GhcPass idR), Outputable (NameOrRdrName (NameOrRdrName (IdP (GhcPass idR)))), Outputable body) => Match (GhcPass idR) body -> SDoc
- pprStmtInCtxt :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR), Outputable body) => HsStmtContext (IdP (GhcPass idL)) -> StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc

# Expressions proper

type LHsExpr p #

Arguments

= Located (HsExpr p) | May have `AnnKeywordId` : `AnnComma` when in a list

Located Haskell Expression

type PostTcExpr = HsExpr GhcTc #

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

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 #

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 `GhcPass p` and such, but it's harder to get it all to work out that way. (`noSyntaxExpr` is hard to write, for example.)

Constructors

SyntaxExpr |
Fields syn_expr :: HsExpr p syn_arg_wraps :: [HsWrapper] syn_res_wrap :: HsWrapper

Instances

Data (SyntaxExpr GhcTc) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SyntaxExpr GhcTc -> c (SyntaxExpr GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (SyntaxExpr GhcTc) Source # toConstr :: SyntaxExpr GhcTc -> Constr Source # dataTypeOf :: SyntaxExpr GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (SyntaxExpr GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (SyntaxExpr GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> SyntaxExpr GhcTc -> SyntaxExpr GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SyntaxExpr GhcTc -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SyntaxExpr GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> SyntaxExpr GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> SyntaxExpr GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SyntaxExpr GhcTc -> m (SyntaxExpr GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SyntaxExpr GhcTc -> m (SyntaxExpr GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SyntaxExpr GhcTc -> m (SyntaxExpr GhcTc) Source #
Data (SyntaxExpr GhcRn) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SyntaxExpr GhcRn -> c (SyntaxExpr GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (SyntaxExpr GhcRn) Source # toConstr :: SyntaxExpr GhcRn -> Constr Source # dataTypeOf :: SyntaxExpr GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (SyntaxExpr GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (SyntaxExpr GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> SyntaxExpr GhcRn -> SyntaxExpr GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SyntaxExpr GhcRn -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SyntaxExpr GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> SyntaxExpr GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> SyntaxExpr GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SyntaxExpr GhcRn -> m (SyntaxExpr GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SyntaxExpr GhcRn -> m (SyntaxExpr GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SyntaxExpr GhcRn -> m (SyntaxExpr GhcRn) Source #
Data (SyntaxExpr GhcPs) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SyntaxExpr GhcPs -> c (SyntaxExpr GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (SyntaxExpr GhcPs) Source # toConstr :: SyntaxExpr GhcPs -> Constr Source # dataTypeOf :: SyntaxExpr GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (SyntaxExpr GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (SyntaxExpr GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> SyntaxExpr GhcPs -> SyntaxExpr GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SyntaxExpr GhcPs -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SyntaxExpr GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> SyntaxExpr GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> SyntaxExpr GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SyntaxExpr GhcPs -> m (SyntaxExpr GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SyntaxExpr GhcPs -> m (SyntaxExpr GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SyntaxExpr GhcPs -> m (SyntaxExpr GhcPs) Source #
(p ~ GhcPass pass, OutputableBndrId p) => Outputable (SyntaxExpr p) # |
Instance details Defined in HsExpr Methods ppr :: SyntaxExpr p -> SDoc # pprPrec :: Rational -> SyntaxExpr p -> SDoc #

noExpr :: HsExpr (GhcPass p) #

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

noSyntaxExpr :: SyntaxExpr (GhcPass p) #

mkRnSyntaxExpr :: Name -> SyntaxExpr GhcRn #

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

type CmdSyntaxTable p = [(Name, HsExpr p)] #

Command Syntax Table (for Arrow syntax)

data UnboundVar #

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 # |
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 # |
Instance details Defined in HsExpr Methods ppr :: UnboundVar -> SDoc # pprPrec :: Rational -> UnboundVar -> SDoc #

unboundVarOcc :: UnboundVar -> OccName #

data HsExpr p #

A Haskell expression.

Constructors

HsVar (XVar p) (Located (IdP p)) | Variable
HsUnboundVar (XUnboundVar p) 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 (XConLikeOut p) ConLike | After typechecker only; must be different HsVar for pretty printing
HsRecFld (XRecFld p) (AmbiguousFieldOcc p) | Variable pointing to record selector Not in use after typechecking
HsOverLabel (XOverLabel p) (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 (XIPVar p) HsIPName | Implicit parameter (not in use after typechecking)
HsOverLit (XOverLitE p) (HsOverLit p) | Overloaded literals
HsLit (XLitE p) (HsLit p) | Simple (non-overloaded) literals
HsLam (XLam p) (MatchGroup p (LHsExpr p)) | Lambda abstraction. Currently always a single match `AnnKeywordId` : `AnnLam`, `AnnRarrow`,
HsLamCase (XLamCase p) (MatchGroup p (LHsExpr p)) | Lambda-case `AnnKeywordId` : `AnnLam`, `AnnCase`,`AnnOpen`, `AnnClose`
HsApp (XApp p) (LHsExpr p) (LHsExpr p) | Application
HsAppType (XAppTypeE p) (LHsExpr p) | Visible type application Explicit type argument; e.g f @Int x y NB: Has wildcards, but no implicit quantification `AnnKeywordId` : `AnnAt`,
OpApp (XOpApp p) (LHsExpr p) (LHsExpr p) (LHsExpr p) | Operator applications: NB Bracketed ops such as (+) come out as Vars.
NegApp (XNegApp p) (LHsExpr p) (SyntaxExpr p) | Negation operator. Contains the negated expression and the name of `negate` `AnnKeywordId` : `AnnMinus`
HsPar (XPar p) (LHsExpr p) | Parenthesised expr; see Note [Parens in HsSyn]
SectionL (XSectionL p) (LHsExpr p) (LHsExpr p) |
SectionR (XSectionR p) (LHsExpr p) (LHsExpr p) |
ExplicitTuple (XExplicitTuple p) [LHsTupArg p] Boxity | Used for explicit tuples and sections thereof `AnnKeywordId` : `AnnOpen`, `AnnClose`
ExplicitSum (XExplicitSum p) ConTag Arity (LHsExpr p) | Used for unboxed sum types `AnnKeywordId` : `AnnOpen` `'(#'`, `AnnVbar`, `AnnClose` `'#)'`, There will be multiple `AnnVbar`, (1 - alternative) before the expression, (arity - alternative) after it
HsCase (XCase p) (LHsExpr p) (MatchGroup p (LHsExpr p)) | `AnnKeywordId` : `AnnCase`, `AnnOf`,`AnnOpen` `'{'`, `AnnClose` `'}'`
HsIf (XIf p) (Maybe (SyntaxExpr p)) (LHsExpr p) (LHsExpr p) (LHsExpr p) | `AnnKeywordId` : `AnnIf`, `AnnSemi`, `AnnThen`,`AnnSemi`, `AnnElse`,
HsMultiIf (XMultiIf p) [LGRHS p (LHsExpr p)] | Multi-way if `AnnKeywordId` : `AnnIf` `AnnOpen`,`AnnClose`,
HsLet (XLet p) (LHsLocalBinds p) (LHsExpr p) | let(rec) `AnnKeywordId` : `AnnLet`, `AnnOpen` `'{'`, `AnnClose` `'}'`,`AnnIn`
HsDo (XDo p) (HsStmtContext Name) (Located [ExprLStmt p]) | `AnnKeywordId` : `AnnDo`, `AnnOpen`, `AnnSemi`, `AnnVbar`, `AnnClose`
ExplicitList (XExplicitList p) (Maybe (SyntaxExpr p)) [LHsExpr p] | Syntactic list: [a,b,c,...] `AnnKeywordId` : `AnnOpen` `'['`, `AnnClose` `']'`
RecordCon | Record construction `AnnKeywordId` : `AnnOpen` `'{'`, `AnnDotdot`,`AnnClose` `'}'`
Fields rcon_ext :: XRecordCon p rcon_con_name :: Located (IdP p) rcon_flds :: HsRecordBinds p
RecordUpd | Record update `AnnKeywordId` : `AnnOpen` `'{'`, `AnnDotdot`,`AnnClose` `'}'`
Fields rupd_ext :: XRecordUpd p rupd_expr :: LHsExpr p rupd_flds :: [LHsRecUpdField p]
ExprWithTySig (XExprWithTySig p) (LHsExpr p) | Expression with an explicit type signature. `e :: type` `AnnKeywordId` : `AnnDcolon`
ArithSeq (XArithSeq p) (Maybe (SyntaxExpr p)) (ArithSeqInfo p) | Arithmetic sequence `AnnKeywordId` : `AnnOpen` `'['`, `AnnComma`,`AnnDotdot`, `AnnClose` `']'`
HsSCC (XSCC p) SourceText StringLiteral (LHsExpr p) |
HsCoreAnn (XCoreAnn p) SourceText StringLiteral (LHsExpr p) | `AnnKeywordId` : `AnnOpen` `'{-# CORE'`, `AnnVal`, `AnnClose` `'#-}'`
HsBracket (XBracket p) (HsBracket p) | `AnnKeywordId` : `AnnOpen`, `AnnOpenE`,`AnnOpenEQ`, `AnnClose`,`AnnCloseQ`
HsRnBracketOut (XRnBracketOut p) (HsBracket GhcRn) [PendingRnSplice] |
HsTcBracketOut (XTcBracketOut p) (HsBracket GhcRn) [PendingTcSplice] |
HsSpliceE (XSpliceE p) (HsSplice p) | `AnnKeywordId` : `AnnOpen`, `AnnClose`
HsProc (XProc p) (LPat p) (LHsCmdTop p) | `proc` notation for Arrows `AnnKeywordId` : `AnnProc`, `AnnRarrow`
HsStatic (XStatic p) (LHsExpr p) | `AnnKeywordId` : `AnnStatic`,
HsArrApp (XArrApp p) (LHsExpr p) (LHsExpr p) HsArrAppType Bool | `AnnKeywordId` : `Annlarrowtail`, `Annrarrowtail`,`AnnLarrowtail`, `AnnRarrowtail`
HsArrForm (XArrForm p) (LHsExpr p) (Maybe Fixity) [LHsCmdTop p] | `AnnKeywordId` : `AnnOpenB` `'(|'`, `AnnCloseB` `'|)'`
HsTick (XTick p) (Tickish (IdP p)) (LHsExpr p) |
HsBinTick (XBinTick p) Int Int (LHsExpr p) |
HsTickPragma (XTickPragma p) SourceText (StringLiteral, (Int, Int), (Int, Int)) ((SourceText, SourceText), (SourceText, SourceText)) (LHsExpr p) | `AnnKeywordId` : `AnnOpen`, `AnnOpen` `'{-# GENERATED'`, `AnnVal`,`AnnVal`, `AnnColon`,`AnnVal`, `AnnMinus`, `AnnVal`,`AnnColon`, `AnnVal`, `AnnClose` `'#-}'`
EWildPat (XEWildPat p) |
EAsPat (XEAsPat p) (Located (IdP p)) (LHsExpr p) | `AnnKeywordId` : `AnnAt`
EViewPat (XEViewPat p) (LHsExpr p) (LHsExpr p) | `AnnKeywordId` : `AnnRarrow`
ELazyPat (XELazyPat p) (LHsExpr p) | `AnnKeywordId` : `AnnTilde`
HsWrap (XWrap p) HsWrapper (HsExpr p) |
XExpr (XXExpr p) |

Instances

Data (HsExpr GhcTc) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsExpr GhcTc -> c (HsExpr GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsExpr GhcTc) Source # toConstr :: HsExpr GhcTc -> Constr Source # dataTypeOf :: HsExpr GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsExpr GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsExpr GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> HsExpr GhcTc -> HsExpr GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsExpr GhcTc -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsExpr GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsExpr GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsExpr GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsExpr GhcTc -> m (HsExpr GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsExpr GhcTc -> m (HsExpr GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsExpr GhcTc -> m (HsExpr GhcTc) Source #
Data (HsExpr GhcRn) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsExpr GhcRn -> c (HsExpr GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsExpr GhcRn) Source # toConstr :: HsExpr GhcRn -> Constr Source # dataTypeOf :: HsExpr GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsExpr GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsExpr GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> HsExpr GhcRn -> HsExpr GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsExpr GhcRn -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsExpr GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsExpr GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsExpr GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsExpr GhcRn -> m (HsExpr GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsExpr GhcRn -> m (HsExpr GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsExpr GhcRn -> m (HsExpr GhcRn) Source #
Data (HsExpr GhcPs) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsExpr GhcPs -> c (HsExpr GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsExpr GhcPs) Source # toConstr :: HsExpr GhcPs -> Constr Source # dataTypeOf :: HsExpr GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsExpr GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsExpr GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> HsExpr GhcPs -> HsExpr GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsExpr GhcPs -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsExpr GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsExpr GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsExpr GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsExpr GhcPs -> m (HsExpr GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsExpr GhcPs -> m (HsExpr GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsExpr GhcPs -> m (HsExpr GhcPs) Source #
(p ~ GhcPass pass, OutputableBndrId p) => Outputable (HsExpr p) # |
Instance details Defined in HsExpr Methods ppr :: HsExpr p -> SDoc # pprPrec :: Rational -> HsExpr p -> SDoc #

data RecordConTc #

Extra data fields for a `RecordCon`, added by the type checker

Constructors

RecordConTc |
Fields rcon_con_like :: ConLike rcon_con_expr :: PostTcExpr

Instances

Data RecordConTc # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RecordConTc -> c RecordConTc Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RecordConTc Source # toConstr :: RecordConTc -> Constr Source # dataTypeOf :: RecordConTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RecordConTc) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RecordConTc) Source # gmapT :: (forall b. Data b => b -> b) -> RecordConTc -> RecordConTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RecordConTc -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RecordConTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> RecordConTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> RecordConTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RecordConTc -> m RecordConTc Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RecordConTc -> m RecordConTc Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RecordConTc -> m RecordConTc Source #

data RecordUpdTc #

Extra data fields for a `RecordUpd`, added by the type checker

Constructors

RecordUpdTc |
Fields rupd_cons :: [ConLike] rupd_in_tys :: [Type] rupd_out_tys :: [Type] rupd_wrap :: HsWrapper

Instances

Data RecordUpdTc # |
Instance details Defined in HsExpr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RecordUpdTc -> c RecordUpdTc Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RecordUpdTc Source # toConstr :: RecordUpdTc -> Constr Source # dataTypeOf :: RecordUpdTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RecordUpdTc) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RecordUpdTc) Source # gmapT :: (forall b. Data b => b -> b) -> RecordUpdTc -> RecordUpdTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RecordUpdTc -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RecordUpdTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> RecordUpdTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> RecordUpdTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RecordUpdTc -> m RecordUpdTc Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RecordUpdTc -> m RecordUpdTc Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RecordUpdTc -> m RecordUpdTc Source #

type LHsTupArg id = Located (HsTupArg id) #

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 #

- `AnnKeywordId` : `AnnComma`

Haskell Tuple Argument

Constructors

Present (XPresent id) (LHsExpr id) | The argument
Missing (XMissing id) | The argument is missing, but this is its type
XTupArg (XXTupArg id) | Note [Trees that Grow] extension point

Instances

Data (HsTupArg GhcTc) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsTupArg GhcTc -> c (HsTupArg GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsTupArg GhcTc) Source # toConstr :: HsTupArg GhcTc -> Constr Source # dataTypeOf :: HsTupArg GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsTupArg GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsTupArg GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> HsTupArg GhcTc -> HsTupArg GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsTupArg GhcTc -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsTupArg GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsTupArg GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsTupArg GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsTupArg GhcTc -> m (HsTupArg GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTupArg GhcTc -> m (HsTupArg GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTupArg GhcTc -> m (HsTupArg GhcTc) Source #
Data (HsTupArg GhcRn) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsTupArg GhcRn -> c (HsTupArg GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsTupArg GhcRn) Source # toConstr :: HsTupArg GhcRn -> Constr Source # dataTypeOf :: HsTupArg GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsTupArg GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsTupArg GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> HsTupArg GhcRn -> HsTupArg GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsTupArg GhcRn -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsTupArg GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsTupArg GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsTupArg GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsTupArg GhcRn -> m (HsTupArg GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTupArg GhcRn -> m (HsTupArg GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTupArg GhcRn -> m (HsTupArg GhcRn) Source #
Data (HsTupArg GhcPs) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsTupArg GhcPs -> c (HsTupArg GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsTupArg GhcPs) Source # toConstr :: HsTupArg GhcPs -> Constr Source # dataTypeOf :: HsTupArg GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsTupArg GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsTupArg GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> HsTupArg GhcPs -> HsTupArg GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsTupArg GhcPs -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsTupArg GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsTupArg GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsTupArg GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsTupArg GhcPs -> m (HsTupArg GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTupArg GhcPs -> m (HsTupArg GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTupArg GhcPs -> m (HsTupArg GhcPs) Source #

tupArgPresent :: LHsTupArg id -> Bool #

pprLExpr :: OutputableBndrId (GhcPass p) => LHsExpr (GhcPass p) -> SDoc #

pprExpr :: OutputableBndrId (GhcPass p) => HsExpr (GhcPass p) -> SDoc #

isQuietHsExpr :: HsExpr id -> Bool #

pprBinds :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR)) => HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> SDoc #

ppr_lexpr :: OutputableBndrId (GhcPass p) => LHsExpr (GhcPass p) -> SDoc #

ppr_expr :: forall p. OutputableBndrId (GhcPass p) => HsExpr (GhcPass p) -> SDoc #

ppr_apps :: OutputableBndrId (GhcPass p) => HsExpr (GhcPass p) -> [Either (LHsExpr (GhcPass p)) (XAppTypeE (GhcPass p))] -> SDoc #

pprExternalSrcLoc :: (StringLiteral, (Int, Int), (Int, Int)) -> SDoc #

pprDebugParendExpr :: OutputableBndrId (GhcPass p) => PprPrec -> LHsExpr (GhcPass p) -> SDoc #

pprParendLExpr :: OutputableBndrId (GhcPass p) => PprPrec -> LHsExpr (GhcPass p) -> SDoc #

pprParendExpr :: OutputableBndrId (GhcPass p) => PprPrec -> HsExpr (GhcPass p) -> SDoc #

hsExprNeedsParens :: PprPrec -> HsExpr p -> Bool #

``hsExprNeedsParens` p e` returns `True` if the expression `e` needs parentheses under precedence `p`.

parenthesizeHsExpr :: PprPrec -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) #

``parenthesizeHsExpr` p e` checks if ``hsExprNeedsParens` p e` is true, and if so, surrounds `e` with an `HsPar`. Otherwise, it simply returns `e`.

isAtomicHsExpr :: HsExpr id -> Bool #

type LHsCmd id = Located (HsCmd id) #

Located Haskell Command (for arrow syntax)

data HsCmd id #

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

Constructors

HsCmdArrApp (XCmdArrApp id) (LHsExpr id) (LHsExpr id) HsArrAppType Bool | `AnnKeywordId` : `Annlarrowtail`, `Annrarrowtail`,`AnnLarrowtail`, `AnnRarrowtail`
HsCmdArrForm (XCmdArrForm id) (LHsExpr id) LexicalFixity (Maybe Fixity) [LHsCmdTop id] | `AnnKeywordId` : `AnnOpenB` `'(|'`, `AnnCloseB` `'|)'`
HsCmdApp (XCmdApp id) (LHsCmd id) (LHsExpr id) |
HsCmdLam (XCmdLam id) (MatchGroup id (LHsCmd id)) | `AnnKeywordId` : `AnnLam`, `AnnRarrow`,
HsCmdPar (XCmdPar id) (LHsCmd id) | `AnnKeywordId` : `AnnOpen` `'('`, `AnnClose` `')'`
HsCmdCase (XCmdCase id) (LHsExpr id) (MatchGroup id (LHsCmd id)) | `AnnKeywordId` : `AnnCase`, `AnnOf`,`AnnOpen` `'{'`, `AnnClose` `'}'`
HsCmdIf (XCmdIf id) (Maybe (SyntaxExpr id)) (LHsExpr id) (LHsCmd id) (LHsCmd id) | `AnnKeywordId` : `AnnIf`, `AnnSemi`, `AnnThen`,`AnnSemi`, `AnnElse`,
HsCmdLet (XCmdLet id) (LHsLocalBinds id) (LHsCmd id) | `AnnKeywordId` : `AnnLet`, `AnnOpen` `'{'`, `AnnClose` `'}'`,`AnnIn`
HsCmdDo (XCmdDo id) (Located [CmdLStmt id]) | `AnnKeywordId` : `AnnDo`, `AnnOpen`, `AnnSemi`, `AnnVbar`, `AnnClose`
HsCmdWrap (XCmdWrap id) HsWrapper (HsCmd id) |
XCmd (XXCmd id) |

Instances

Data (HsCmd GhcTc) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsCmd GhcTc -> c (HsCmd GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsCmd GhcTc) Source # toConstr :: HsCmd GhcTc -> Constr Source # dataTypeOf :: HsCmd GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsCmd GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsCmd GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> HsCmd GhcTc -> HsCmd GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsCmd GhcTc -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsCmd GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsCmd GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsCmd GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsCmd GhcTc -> m (HsCmd GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsCmd GhcTc -> m (HsCmd GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsCmd GhcTc -> m (HsCmd GhcTc) Source #
Data (HsCmd GhcRn) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsCmd GhcRn -> c (HsCmd GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsCmd GhcRn) Source # toConstr :: HsCmd GhcRn -> Constr Source # dataTypeOf :: HsCmd GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsCmd GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsCmd GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> HsCmd GhcRn -> HsCmd GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsCmd GhcRn -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsCmd GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsCmd GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsCmd GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsCmd GhcRn -> m (HsCmd GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsCmd GhcRn -> m (HsCmd GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsCmd GhcRn -> m (HsCmd GhcRn) Source #
Data (HsCmd GhcPs) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsCmd GhcPs -> c (HsCmd GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsCmd GhcPs) Source # toConstr :: HsCmd GhcPs -> Constr Source # dataTypeOf :: HsCmd GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsCmd GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsCmd GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> HsCmd GhcPs -> HsCmd GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsCmd GhcPs -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsCmd GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsCmd GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsCmd GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsCmd GhcPs -> m (HsCmd GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsCmd GhcPs -> m (HsCmd GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsCmd GhcPs -> m (HsCmd GhcPs) Source #
(p ~ GhcPass pass, OutputableBndrId p) => Outputable (HsCmd p) # |
Instance details Defined in HsExpr Methods ppr :: HsCmd p -> SDoc # pprPrec :: Rational -> HsCmd p -> SDoc #

data HsArrAppType #

Haskell Array Application Type

Constructors

HsHigherOrderApp |
HsFirstOrderApp |

Instances

Data HsArrAppType # |
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) #

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 #

Haskell Top-level Command

Constructors

HsCmdTop (XCmdTop p) (LHsCmd p) |
XCmdTop (XXCmdTop p) |

Instances

Data (HsCmdTop GhcTc) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsCmdTop GhcTc -> c (HsCmdTop GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsCmdTop GhcTc) Source # toConstr :: HsCmdTop GhcTc -> Constr Source # dataTypeOf :: HsCmdTop GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsCmdTop GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsCmdTop GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> HsCmdTop GhcTc -> HsCmdTop GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsCmdTop GhcTc -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsCmdTop GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsCmdTop GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsCmdTop GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsCmdTop GhcTc -> m (HsCmdTop GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsCmdTop GhcTc -> m (HsCmdTop GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsCmdTop GhcTc -> m (HsCmdTop GhcTc) Source #
Data (HsCmdTop GhcRn) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsCmdTop GhcRn -> c (HsCmdTop GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsCmdTop GhcRn) Source # toConstr :: HsCmdTop GhcRn -> Constr Source # dataTypeOf :: HsCmdTop GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsCmdTop GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsCmdTop GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> HsCmdTop GhcRn -> HsCmdTop GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsCmdTop GhcRn -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsCmdTop GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsCmdTop GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsCmdTop GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsCmdTop GhcRn -> m (HsCmdTop GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsCmdTop GhcRn -> m (HsCmdTop GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsCmdTop GhcRn -> m (HsCmdTop GhcRn) Source #
Data (HsCmdTop GhcPs) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsCmdTop GhcPs -> c (HsCmdTop GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsCmdTop GhcPs) Source # toConstr :: HsCmdTop GhcPs -> Constr Source # dataTypeOf :: HsCmdTop GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsCmdTop GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsCmdTop GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> HsCmdTop GhcPs -> HsCmdTop GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsCmdTop GhcPs -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsCmdTop GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsCmdTop GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsCmdTop GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsCmdTop GhcPs -> m (HsCmdTop GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsCmdTop GhcPs -> m (HsCmdTop GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsCmdTop GhcPs -> m (HsCmdTop GhcPs) Source #
(p ~ GhcPass pass, OutputableBndrId p) => Outputable (HsCmdTop p) # |
Instance details Defined in HsExpr Methods ppr :: HsCmdTop p -> SDoc # pprPrec :: Rational -> HsCmdTop p -> SDoc #

data CmdTopTc #

Constructors

CmdTopTc Type Type (CmdSyntaxTable GhcTc) |

Instances

Data CmdTopTc # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CmdTopTc -> c CmdTopTc Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CmdTopTc Source # toConstr :: CmdTopTc -> Constr Source # dataTypeOf :: CmdTopTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CmdTopTc) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CmdTopTc) Source # gmapT :: (forall b. Data b => b -> b) -> CmdTopTc -> CmdTopTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CmdTopTc -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CmdTopTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> CmdTopTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> CmdTopTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CmdTopTc -> m CmdTopTc Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CmdTopTc -> m CmdTopTc Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CmdTopTc -> m CmdTopTc Source #

pprLCmd :: OutputableBndrId (GhcPass p) => LHsCmd (GhcPass p) -> SDoc #

pprCmd :: OutputableBndrId (GhcPass p) => HsCmd (GhcPass p) -> SDoc #

isQuietHsCmd :: HsCmd id -> Bool #

ppr_lcmd :: OutputableBndrId (GhcPass p) => LHsCmd (GhcPass p) -> SDoc #

ppr_cmd :: forall p. OutputableBndrId (GhcPass p) => HsCmd (GhcPass p) -> SDoc #

pprCmdArg :: OutputableBndrId (GhcPass p) => HsCmdTop (GhcPass p) -> SDoc #

type HsRecordBinds p = HsRecFields p (LHsExpr p) #

Haskell Record Bindings

data MatchGroup p body #

Constructors

MG |
Fields mg_ext :: XMG p body mg_alts :: Located [LMatch p body] mg_origin :: Origin
XMatchGroup (XXMatchGroup p body) |

Instances

Data body => Data (MatchGroup GhcTc body) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MatchGroup GhcTc body -> c (MatchGroup GhcTc body) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (MatchGroup GhcTc body) Source # toConstr :: MatchGroup GhcTc body -> Constr Source # dataTypeOf :: MatchGroup GhcTc body -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (MatchGroup GhcTc body)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (MatchGroup GhcTc body)) Source # gmapT :: (forall b. Data b => b -> b) -> MatchGroup GhcTc body -> MatchGroup GhcTc body Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroup GhcTc body -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroup GhcTc body -> r Source # gmapQ :: (forall d. Data d => d -> u) -> MatchGroup GhcTc body -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> MatchGroup GhcTc body -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> MatchGroup GhcTc body -> m (MatchGroup GhcTc body) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroup GhcTc body -> m (MatchGroup GhcTc body) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroup GhcTc body -> m (MatchGroup GhcTc body) Source #
Data body => Data (MatchGroup GhcRn body) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MatchGroup GhcRn body -> c (MatchGroup GhcRn body) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (MatchGroup GhcRn body) Source # toConstr :: MatchGroup GhcRn body -> Constr Source # dataTypeOf :: MatchGroup GhcRn body -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (MatchGroup GhcRn body)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (MatchGroup GhcRn body)) Source # gmapT :: (forall b. Data b => b -> b) -> MatchGroup GhcRn body -> MatchGroup GhcRn body Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroup GhcRn body -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroup GhcRn body -> r Source # gmapQ :: (forall d. Data d => d -> u) -> MatchGroup GhcRn body -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> MatchGroup GhcRn body -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> MatchGroup GhcRn body -> m (MatchGroup GhcRn body) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroup GhcRn body -> m (MatchGroup GhcRn body) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroup GhcRn body -> m (MatchGroup GhcRn body) Source #
Data body => Data (MatchGroup GhcPs body) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MatchGroup GhcPs body -> c (MatchGroup GhcPs body) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (MatchGroup GhcPs body) Source # toConstr :: MatchGroup GhcPs body -> Constr Source # dataTypeOf :: MatchGroup GhcPs body -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (MatchGroup GhcPs body)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (MatchGroup GhcPs body)) Source # gmapT :: (forall b. Data b => b -> b) -> MatchGroup GhcPs body -> MatchGroup GhcPs body Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroup GhcPs body -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroup GhcPs body -> r Source # gmapQ :: (forall d. Data d => d -> u) -> MatchGroup GhcPs body -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> MatchGroup GhcPs body -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> MatchGroup GhcPs body -> m (MatchGroup GhcPs body) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroup GhcPs body -> m (MatchGroup GhcPs body) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroup GhcPs body -> m (MatchGroup GhcPs body) Source #

data MatchGroupTc #

Constructors

MatchGroupTc |
Fields mg_arg_tys :: [Type] mg_res_ty :: Type

Instances

Data MatchGroupTc # |
Instance details Defined in HsExpr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MatchGroupTc -> c MatchGroupTc Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c MatchGroupTc Source # toConstr :: MatchGroupTc -> Constr Source # dataTypeOf :: MatchGroupTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c MatchGroupTc) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MatchGroupTc) Source # gmapT :: (forall b. Data b => b -> b) -> MatchGroupTc -> MatchGroupTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroupTc -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MatchGroupTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> MatchGroupTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> MatchGroupTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> MatchGroupTc -> m MatchGroupTc Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroupTc -> m MatchGroupTc Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchGroupTc -> m MatchGroupTc Source #

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

Located Match

May have `AnnKeywordId` : `AnnSemi` when in a list

data Match p body #

Constructors

Match |
Fields m_ext :: XCMatch p body m_ctxt :: HsMatchContext (NameOrRdrName (IdP p)) m_pats :: [LPat p] m_grhss :: GRHSs p body
XMatch (XXMatch p body) |

Instances

Data body => Data (Match GhcTc body) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Match GhcTc body -> c (Match GhcTc body) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Match GhcTc body) Source # toConstr :: Match GhcTc body -> Constr Source # dataTypeOf :: Match GhcTc body -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Match GhcTc body)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Match GhcTc body)) Source # gmapT :: (forall b. Data b => b -> b) -> Match GhcTc body -> Match GhcTc body Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Match GhcTc body -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Match GhcTc body -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Match GhcTc body -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Match GhcTc body -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Match GhcTc body -> m (Match GhcTc body) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Match GhcTc body -> m (Match GhcTc body) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Match GhcTc body -> m (Match GhcTc body) Source #
Data body => Data (Match GhcRn body) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Match GhcRn body -> c (Match GhcRn body) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Match GhcRn body) Source # toConstr :: Match GhcRn body -> Constr Source # dataTypeOf :: Match GhcRn body -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Match GhcRn body)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Match GhcRn body)) Source # gmapT :: (forall b. Data b => b -> b) -> Match GhcRn body -> Match GhcRn body Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Match GhcRn body -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Match GhcRn body -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Match GhcRn body -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Match GhcRn body -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Match GhcRn body -> m (Match GhcRn body) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Match GhcRn body -> m (Match GhcRn body) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Match GhcRn body -> m (Match GhcRn body) Source #
Data body => Data (Match GhcPs body) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Match GhcPs body -> c (Match GhcPs body) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Match GhcPs body) Source # toConstr :: Match GhcPs body -> Constr Source # dataTypeOf :: Match GhcPs body -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Match GhcPs body)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Match GhcPs body)) Source # gmapT :: (forall b. Data b => b -> b) -> Match GhcPs body -> Match GhcPs body Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Match GhcPs body -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Match GhcPs body -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Match GhcPs body -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Match GhcPs body -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Match GhcPs body -> m (Match GhcPs body) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Match GhcPs body -> m (Match GhcPs body) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Match GhcPs body -> m (Match GhcPs body) Source #
(idR ~ GhcPass pr, OutputableBndrId idR, Outputable body) => Outputable (Match idR body) # |
Instance details Defined in HsExpr Methods ppr :: Match idR body -> SDoc # pprPrec :: Rational -> Match idR body -> SDoc #

isInfixMatch :: Match id body -> Bool #

isEmptyMatchGroup :: MatchGroup id body -> Bool #

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

Is there only one RHS in this list of matches?

matchGroupArity :: MatchGroup id body -> Arity #

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

data GRHSs p body #

Guarded Right-Hand Sides

GRHSs are used both for pattern bindings and for Matches

- `AnnKeywordId` : `AnnVbar`, `AnnEqual`,`AnnWhere`, `AnnOpen`,`AnnClose` `AnnRarrow`,`AnnSemi`

Constructors

GRHSs |
Fields grhssExt :: XCGRHSs p body grhssGRHSs :: [LGRHS p body] Guarded RHSs grhssLocalBinds :: LHsLocalBinds p The where clause
XGRHSs (XXGRHSs p body) |

Instances

Data body => Data (GRHSs GhcTc body) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GRHSs GhcTc body -> c (GRHSs GhcTc body) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GRHSs GhcTc body) Source # toConstr :: GRHSs GhcTc body -> Constr Source # dataTypeOf :: GRHSs GhcTc body -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GRHSs GhcTc body)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GRHSs GhcTc body)) Source # gmapT :: (forall b. Data b => b -> b) -> GRHSs GhcTc body -> GRHSs GhcTc body Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GRHSs GhcTc body -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GRHSs GhcTc body -> r Source # gmapQ :: (forall d. Data d => d -> u) -> GRHSs GhcTc body -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> GRHSs GhcTc body -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GRHSs GhcTc body -> m (GRHSs GhcTc body) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHSs GhcTc body -> m (GRHSs GhcTc body) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHSs GhcTc body -> m (GRHSs GhcTc body) Source #
Data body => Data (GRHSs GhcRn body) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GRHSs GhcRn body -> c (GRHSs GhcRn body) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GRHSs GhcRn body) Source # toConstr :: GRHSs GhcRn body -> Constr Source # dataTypeOf :: GRHSs GhcRn body -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GRHSs GhcRn body)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GRHSs GhcRn body)) Source # gmapT :: (forall b. Data b => b -> b) -> GRHSs GhcRn body -> GRHSs GhcRn body Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GRHSs GhcRn body -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GRHSs GhcRn body -> r Source # gmapQ :: (forall d. Data d => d -> u) -> GRHSs GhcRn body -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> GRHSs GhcRn body -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GRHSs GhcRn body -> m (GRHSs GhcRn body) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHSs GhcRn body -> m (GRHSs GhcRn body) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHSs GhcRn body -> m (GRHSs GhcRn body) Source #
Data body => Data (GRHSs GhcPs body) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GRHSs GhcPs body -> c (GRHSs GhcPs body) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GRHSs GhcPs body) Source # toConstr :: GRHSs GhcPs body -> Constr Source # dataTypeOf :: GRHSs GhcPs body -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GRHSs GhcPs body)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GRHSs GhcPs body)) Source # gmapT :: (forall b. Data b => b -> b) -> GRHSs GhcPs body -> GRHSs GhcPs body Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GRHSs GhcPs body -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GRHSs GhcPs body -> r Source # gmapQ :: (forall d. Data d => d -> u) -> GRHSs GhcPs body -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> GRHSs GhcPs body -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GRHSs GhcPs body -> m (GRHSs GhcPs body) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHSs GhcPs body -> m (GRHSs GhcPs body) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHSs GhcPs body -> m (GRHSs GhcPs body) Source #

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

Located Guarded Right-Hand Side

data GRHS p body #

Guarded Right Hand Side.

Constructors

GRHS (XCGRHS p body) [GuardLStmt p] body |
XGRHS (XXGRHS p body) |

Instances

Data body => Data (GRHS GhcTc body) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GRHS GhcTc body -> c (GRHS GhcTc body) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GRHS GhcTc body) Source # toConstr :: GRHS GhcTc body -> Constr Source # dataTypeOf :: GRHS GhcTc body -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GRHS GhcTc body)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GRHS GhcTc body)) Source # gmapT :: (forall b. Data b => b -> b) -> GRHS GhcTc body -> GRHS GhcTc body Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GRHS GhcTc body -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GRHS GhcTc body -> r Source # gmapQ :: (forall d. Data d => d -> u) -> GRHS GhcTc body -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> GRHS GhcTc body -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GRHS GhcTc body -> m (GRHS GhcTc body) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHS GhcTc body -> m (GRHS GhcTc body) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHS GhcTc body -> m (GRHS GhcTc body) Source #
Data body => Data (GRHS GhcRn body) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GRHS GhcRn body -> c (GRHS GhcRn body) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GRHS GhcRn body) Source # toConstr :: GRHS GhcRn body -> Constr Source # dataTypeOf :: GRHS GhcRn body -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GRHS GhcRn body)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GRHS GhcRn body)) Source # gmapT :: (forall b. Data b => b -> b) -> GRHS GhcRn body -> GRHS GhcRn body Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GRHS GhcRn body -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GRHS GhcRn body -> r Source # gmapQ :: (forall d. Data d => d -> u) -> GRHS GhcRn body -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> GRHS GhcRn body -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GRHS GhcRn body -> m (GRHS GhcRn body) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHS GhcRn body -> m (GRHS GhcRn body) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHS GhcRn body -> m (GRHS GhcRn body) Source #
Data body => Data (GRHS GhcPs body) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GRHS GhcPs body -> c (GRHS GhcPs body) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (GRHS GhcPs body) Source # toConstr :: GRHS GhcPs body -> Constr Source # dataTypeOf :: GRHS GhcPs body -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (GRHS GhcPs body)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (GRHS GhcPs body)) Source # gmapT :: (forall b. Data b => b -> b) -> GRHS GhcPs body -> GRHS GhcPs body Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GRHS GhcPs body -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GRHS GhcPs body -> r Source # gmapQ :: (forall d. Data d => d -> u) -> GRHS GhcPs body -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> GRHS GhcPs body -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> GRHS GhcPs body -> m (GRHS GhcPs body) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHS GhcPs body -> m (GRHS GhcPs body) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GRHS GhcPs body -> m (GRHS GhcPs body) Source #

pprMatches :: (OutputableBndrId (GhcPass idR), Outputable body) => MatchGroup (GhcPass idR) body -> SDoc #

pprFunBind :: (OutputableBndrId (GhcPass idR), Outputable body) => MatchGroup (GhcPass idR) body -> SDoc #

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

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

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

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

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

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

Located `do` block Statement

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

Located Statement with separate Left and Right id's

type Stmt id body = StmtLR id id body #

`do` block Statement

type CmdLStmt id = LStmt id (LHsCmd id) #

Command Located Statement

type CmdStmt id = Stmt id (LHsCmd id) #

Command Statement

type ExprLStmt id = LStmt id (LHsExpr id) #

Expression Located Statement

type ExprStmt id = Stmt id (LHsExpr id) #

Expression Statement

type GuardLStmt id = LStmt id (LHsExpr id) #

Guard Located Statement

type GuardStmt id = Stmt id (LHsExpr id) #

Guard Statement

type GhciLStmt id = LStmt id (LHsExpr id) #

Ghci Located Statement

type GhciStmt id = Stmt id (LHsExpr id) #

Ghci Statement

data StmtLR idL idR body #

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

Constructors

LastStmt (XLastStmt idL idR body) body Bool (SyntaxExpr idR) |
BindStmt (XBindStmt idL idR body) (LPat idL) body (SyntaxExpr idR) (SyntaxExpr idR) |
ApplicativeStmt (XApplicativeStmt idL idR body) [(SyntaxExpr idR, ApplicativeArg idL)] (Maybe (SyntaxExpr idR)) | `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 (XBodyStmt idL idR body) body (SyntaxExpr idR) (SyntaxExpr idR) |
LetStmt (XLetStmt idL idR body) (LHsLocalBindsLR idL idR) | `AnnKeywordId` : `AnnLet` `AnnOpen` `'{'`,`AnnClose` `'}'`,
ParStmt (XParStmt idL idR body) [ParStmtBlock idL idR] (HsExpr idR) (SyntaxExpr idR) |
TransStmt |
Fields trS_ext :: XTransStmt idL idR body trS_form :: TransForm trS_stmts :: [ExprLStmt idL] trS_bndrs :: [(IdP idR, IdP idR)] trS_using :: LHsExpr idR trS_by :: Maybe (LHsExpr idR) trS_ret :: SyntaxExpr idR trS_bind :: SyntaxExpr idR trS_fmap :: HsExpr idR
RecStmt | `AnnKeywordId` : `AnnRec`
Fields recS_ext :: XRecStmt idL idR body 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
XStmtLR (XXStmtLR idL idR body) |

Instances

Data body => Data (StmtLR GhcTc GhcTc body) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StmtLR GhcTc GhcTc body -> c (StmtLR GhcTc GhcTc body) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (StmtLR GhcTc GhcTc body) Source # toConstr :: StmtLR GhcTc GhcTc body -> Constr Source # dataTypeOf :: StmtLR GhcTc GhcTc body -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (StmtLR GhcTc GhcTc body)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (StmtLR GhcTc GhcTc body)) Source # gmapT :: (forall b. Data b => b -> b) -> StmtLR GhcTc GhcTc body -> StmtLR GhcTc GhcTc body Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR GhcTc GhcTc body -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR GhcTc GhcTc body -> r Source # gmapQ :: (forall d. Data d => d -> u) -> StmtLR GhcTc GhcTc body -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> StmtLR GhcTc GhcTc body -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> StmtLR GhcTc GhcTc body -> m (StmtLR GhcTc GhcTc body) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR GhcTc GhcTc body -> m (StmtLR GhcTc GhcTc body) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR GhcTc GhcTc body -> m (StmtLR GhcTc GhcTc body) Source #
Data body => Data (StmtLR GhcRn GhcRn body) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StmtLR GhcRn GhcRn body -> c (StmtLR GhcRn GhcRn body) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (StmtLR GhcRn GhcRn body) Source # toConstr :: StmtLR GhcRn GhcRn body -> Constr Source # dataTypeOf :: StmtLR GhcRn GhcRn body -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (StmtLR GhcRn GhcRn body)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (StmtLR GhcRn GhcRn body)) Source # gmapT :: (forall b. Data b => b -> b) -> StmtLR GhcRn GhcRn body -> StmtLR GhcRn GhcRn body Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR GhcRn GhcRn body -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR GhcRn GhcRn body -> r Source # gmapQ :: (forall d. Data d => d -> u) -> StmtLR GhcRn GhcRn body -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> StmtLR GhcRn GhcRn body -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> StmtLR GhcRn GhcRn body -> m (StmtLR GhcRn GhcRn body) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR GhcRn GhcRn body -> m (StmtLR GhcRn GhcRn body) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR GhcRn GhcRn body -> m (StmtLR GhcRn GhcRn body) Source #
Data body => Data (StmtLR GhcPs GhcRn body) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StmtLR GhcPs GhcRn body -> c (StmtLR GhcPs GhcRn body) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (StmtLR GhcPs GhcRn body) Source # toConstr :: StmtLR GhcPs GhcRn body -> Constr Source # dataTypeOf :: StmtLR GhcPs GhcRn body -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (StmtLR GhcPs GhcRn body)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (StmtLR GhcPs GhcRn body)) Source # gmapT :: (forall b. Data b => b -> b) -> StmtLR GhcPs GhcRn body -> StmtLR GhcPs GhcRn body Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR GhcPs GhcRn body -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR GhcPs GhcRn body -> r Source # gmapQ :: (forall d. Data d => d -> u) -> StmtLR GhcPs GhcRn body -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> StmtLR GhcPs GhcRn body -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> StmtLR GhcPs GhcRn body -> m (StmtLR GhcPs GhcRn body) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR GhcPs GhcRn body -> m (StmtLR GhcPs GhcRn body) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR GhcPs GhcRn body -> m (StmtLR GhcPs GhcRn body) Source #
Data body => Data (StmtLR GhcPs GhcPs body) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StmtLR GhcPs GhcPs body -> c (StmtLR GhcPs GhcPs body) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (StmtLR GhcPs GhcPs body) Source # toConstr :: StmtLR GhcPs GhcPs body -> Constr Source # dataTypeOf :: StmtLR GhcPs GhcPs body -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (StmtLR GhcPs GhcPs body)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (StmtLR GhcPs GhcPs body)) Source # gmapT :: (forall b. Data b => b -> b) -> StmtLR GhcPs GhcPs body -> StmtLR GhcPs GhcPs body Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR GhcPs GhcPs body -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StmtLR GhcPs GhcPs body -> r Source # gmapQ :: (forall d. Data d => d -> u) -> StmtLR GhcPs GhcPs body -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> StmtLR GhcPs GhcPs body -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> StmtLR GhcPs GhcPs body -> m (StmtLR GhcPs GhcPs body) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR GhcPs GhcPs body -> m (StmtLR GhcPs GhcPs body) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StmtLR GhcPs GhcPs body -> m (StmtLR GhcPs GhcPs body) Source #
(idL ~ GhcPass pl, idR ~ GhcPass pr, OutputableBndrId idL, OutputableBndrId idR, Outputable body) => Outputable (StmtLR idL idR body) # |
Instance details Defined in HsExpr Methods ppr :: StmtLR idL idR body -> SDoc # pprPrec :: Rational -> StmtLR idL idR body -> SDoc #

data RecStmtTc #

Constructors

RecStmtTc |
Fields recS_bind_ty :: Type recS_later_rets :: [PostTcExpr] recS_rec_rets :: [PostTcExpr] recS_ret_ty :: Type

Instances

Data RecStmtTc # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RecStmtTc -> c RecStmtTc Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RecStmtTc Source # toConstr :: RecStmtTc -> Constr Source # dataTypeOf :: RecStmtTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RecStmtTc) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RecStmtTc) Source # gmapT :: (forall b. Data b => b -> b) -> RecStmtTc -> RecStmtTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RecStmtTc -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RecStmtTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> RecStmtTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> RecStmtTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RecStmtTc -> m RecStmtTc Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RecStmtTc -> m RecStmtTc Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RecStmtTc -> m RecStmtTc Source #

data TransForm #

Constructors

ThenForm |
GroupForm |

Instances

Data TransForm # |
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 #

Parenthesised Statement Block

Constructors

ParStmtBlock (XParStmtBlock idL idR) [ExprLStmt idL] [IdP idR] (SyntaxExpr idR) |
XParStmtBlock (XXParStmtBlock idL idR) |

Instances

Data (ParStmtBlock GhcTc GhcTc) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ParStmtBlock GhcTc GhcTc -> c (ParStmtBlock GhcTc GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ParStmtBlock GhcTc GhcTc) Source # toConstr :: ParStmtBlock GhcTc GhcTc -> Constr Source # dataTypeOf :: ParStmtBlock GhcTc GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ParStmtBlock GhcTc GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ParStmtBlock GhcTc GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> ParStmtBlock GhcTc GhcTc -> ParStmtBlock GhcTc GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ParStmtBlock GhcTc GhcTc -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ParStmtBlock GhcTc GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ParStmtBlock GhcTc GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ParStmtBlock GhcTc GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ParStmtBlock GhcTc GhcTc -> m (ParStmtBlock GhcTc GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ParStmtBlock GhcTc GhcTc -> m (ParStmtBlock GhcTc GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ParStmtBlock GhcTc GhcTc -> m (ParStmtBlock GhcTc GhcTc) Source #
Data (ParStmtBlock GhcRn GhcRn) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ParStmtBlock GhcRn GhcRn -> c (ParStmtBlock GhcRn GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ParStmtBlock GhcRn GhcRn) Source # toConstr :: ParStmtBlock GhcRn GhcRn -> Constr Source # dataTypeOf :: ParStmtBlock GhcRn GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ParStmtBlock GhcRn GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ParStmtBlock GhcRn GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> ParStmtBlock GhcRn GhcRn -> ParStmtBlock GhcRn GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ParStmtBlock GhcRn GhcRn -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ParStmtBlock GhcRn GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ParStmtBlock GhcRn GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ParStmtBlock GhcRn GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ParStmtBlock GhcRn GhcRn -> m (ParStmtBlock GhcRn GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ParStmtBlock GhcRn GhcRn -> m (ParStmtBlock GhcRn GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ParStmtBlock GhcRn GhcRn -> m (ParStmtBlock GhcRn GhcRn) Source #
Data (ParStmtBlock GhcPs GhcRn) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ParStmtBlock GhcPs GhcRn -> c (ParStmtBlock GhcPs GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ParStmtBlock GhcPs GhcRn) Source # toConstr :: ParStmtBlock GhcPs GhcRn -> Constr Source # dataTypeOf :: ParStmtBlock GhcPs GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ParStmtBlock GhcPs GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ParStmtBlock GhcPs GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> ParStmtBlock GhcPs GhcRn -> ParStmtBlock GhcPs GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ParStmtBlock GhcPs GhcRn -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ParStmtBlock GhcPs GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ParStmtBlock GhcPs GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ParStmtBlock GhcPs GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ParStmtBlock GhcPs GhcRn -> m (ParStmtBlock GhcPs GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ParStmtBlock GhcPs GhcRn -> m (ParStmtBlock GhcPs GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ParStmtBlock GhcPs GhcRn -> m (ParStmtBlock GhcPs GhcRn) Source #
Data (ParStmtBlock GhcPs GhcPs) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ParStmtBlock GhcPs GhcPs -> c (ParStmtBlock GhcPs GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ParStmtBlock GhcPs GhcPs) Source # toConstr :: ParStmtBlock GhcPs GhcPs -> Constr Source # dataTypeOf :: ParStmtBlock GhcPs GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ParStmtBlock GhcPs GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ParStmtBlock GhcPs GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> ParStmtBlock GhcPs GhcPs -> ParStmtBlock GhcPs GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ParStmtBlock GhcPs GhcPs -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ParStmtBlock GhcPs GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ParStmtBlock GhcPs GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ParStmtBlock GhcPs GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ParStmtBlock GhcPs GhcPs -> m (ParStmtBlock GhcPs GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ParStmtBlock GhcPs GhcPs -> m (ParStmtBlock GhcPs GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ParStmtBlock GhcPs GhcPs -> m (ParStmtBlock GhcPs GhcPs) Source #
(Outputable (StmtLR idL idL (LHsExpr idL)), Outputable (XXParStmtBlock idL idR)) => Outputable (ParStmtBlock idL idR) # |
Instance details Defined in HsExpr Methods ppr :: ParStmtBlock idL idR -> SDoc # pprPrec :: Rational -> ParStmtBlock idL idR -> SDoc #

data ApplicativeArg idL #

Applicative Argument

Constructors

ApplicativeArgOne (XApplicativeArgOne idL) (LPat idL) (LHsExpr idL) Bool |
ApplicativeArgMany (XApplicativeArgMany idL) [ExprLStmt idL] (HsExpr idL) (LPat idL) |
XApplicativeArg (XXApplicativeArg idL) |

Instances

Data (ApplicativeArg GhcTc) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ApplicativeArg GhcTc -> c (ApplicativeArg GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ApplicativeArg GhcTc) Source # toConstr :: ApplicativeArg GhcTc -> Constr Source # dataTypeOf :: ApplicativeArg GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ApplicativeArg GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ApplicativeArg GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> ApplicativeArg GhcTc -> ApplicativeArg GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ApplicativeArg GhcTc -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ApplicativeArg GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ApplicativeArg GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ApplicativeArg GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ApplicativeArg GhcTc -> m (ApplicativeArg GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ApplicativeArg GhcTc -> m (ApplicativeArg GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ApplicativeArg GhcTc -> m (ApplicativeArg GhcTc) Source #
Data (ApplicativeArg GhcRn) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ApplicativeArg GhcRn -> c (ApplicativeArg GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ApplicativeArg GhcRn) Source # toConstr :: ApplicativeArg GhcRn -> Constr Source # dataTypeOf :: ApplicativeArg GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ApplicativeArg GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ApplicativeArg GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> ApplicativeArg GhcRn -> ApplicativeArg GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ApplicativeArg GhcRn -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ApplicativeArg GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ApplicativeArg GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ApplicativeArg GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ApplicativeArg GhcRn -> m (ApplicativeArg GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ApplicativeArg GhcRn -> m (ApplicativeArg GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ApplicativeArg GhcRn -> m (ApplicativeArg GhcRn) Source #
Data (ApplicativeArg GhcPs) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ApplicativeArg GhcPs -> c (ApplicativeArg GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ApplicativeArg GhcPs) Source # toConstr :: ApplicativeArg GhcPs -> Constr Source # dataTypeOf :: ApplicativeArg GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ApplicativeArg GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ApplicativeArg GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> ApplicativeArg GhcPs -> ApplicativeArg GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ApplicativeArg GhcPs -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ApplicativeArg GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ApplicativeArg GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ApplicativeArg GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ApplicativeArg GhcPs -> m (ApplicativeArg GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ApplicativeArg GhcPs -> m (ApplicativeArg GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ApplicativeArg GhcPs -> m (ApplicativeArg GhcPs) Source #

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

pprTransformStmt :: OutputableBndrId (GhcPass p) => [IdP (GhcPass p)] -> LHsExpr (GhcPass p) -> Maybe (LHsExpr (GhcPass p)) -> SDoc #

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

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

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

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

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

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

data HsSplice id #

Haskell Splice

Constructors

HsTypedSplice (XTypedSplice id) SpliceDecoration (IdP id) (LHsExpr id) |
HsUntypedSplice (XUntypedSplice id) SpliceDecoration (IdP id) (LHsExpr id) |
HsQuasiQuote (XQuasiQuote id) (IdP id) (IdP id) SrcSpan FastString |
HsSpliced (XSpliced id) ThModFinalizers (HsSplicedThing id) |
XSplice (XXSplice id) |

Instances

Data (HsSplice GhcTc) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsSplice GhcTc -> c (HsSplice GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsSplice GhcTc) Source # toConstr :: HsSplice GhcTc -> Constr Source # dataTypeOf :: HsSplice GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsSplice GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsSplice GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> HsSplice GhcTc -> HsSplice GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsSplice GhcTc -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsSplice GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsSplice GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsSplice GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsSplice GhcTc -> m (HsSplice GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSplice GhcTc -> m (HsSplice GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSplice GhcTc -> m (HsSplice GhcTc) Source #
Data (HsSplice GhcRn) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsSplice GhcRn -> c (HsSplice GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsSplice GhcRn) Source # toConstr :: HsSplice GhcRn -> Constr Source # dataTypeOf :: HsSplice GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsSplice GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsSplice GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> HsSplice GhcRn -> HsSplice GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsSplice GhcRn -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsSplice GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsSplice GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsSplice GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsSplice GhcRn -> m (HsSplice GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSplice GhcRn -> m (HsSplice GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSplice GhcRn -> m (HsSplice GhcRn) Source #
Data (HsSplice GhcPs) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsSplice GhcPs -> c (HsSplice GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsSplice GhcPs) Source # toConstr :: HsSplice GhcPs -> Constr Source # dataTypeOf :: HsSplice GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsSplice GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsSplice GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> HsSplice GhcPs -> HsSplice GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsSplice GhcPs -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsSplice GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsSplice GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsSplice GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsSplice GhcPs -> m (HsSplice GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSplice GhcPs -> m (HsSplice GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSplice GhcPs -> m (HsSplice GhcPs) Source #
(p ~ GhcPass pass, OutputableBndrId p) => Outputable (HsSplice p) # |
Instance details Defined in HsExpr Methods ppr :: HsSplice p -> SDoc # pprPrec :: Rational -> HsSplice p -> SDoc #

data SpliceDecoration #

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 # |
Instance details Defined in HsExpr Methods (==) :: SpliceDecoration -> SpliceDecoration -> Bool # (/=) :: SpliceDecoration -> SpliceDecoration -> Bool #
Data SpliceDecoration # |
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 # |
Instance details Defined in HsExpr Methods showsPrec :: Int -> SpliceDecoration -> ShowS Source # show :: SpliceDecoration -> String Source # showList :: [SpliceDecoration] -> ShowS Source #
Outputable SpliceDecoration # |
Instance details Defined in HsExpr Methods ppr :: SpliceDecoration -> SDoc # pprPrec :: Rational -> SpliceDecoration -> SDoc #

isTypedSplice :: HsSplice id -> Bool #

newtype ThModFinalizers #

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

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

Data (HsSplicedThing GhcTc) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsSplicedThing GhcTc -> c (HsSplicedThing GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsSplicedThing GhcTc) Source # toConstr :: HsSplicedThing GhcTc -> Constr Source # dataTypeOf :: HsSplicedThing GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsSplicedThing GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsSplicedThing GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> HsSplicedThing GhcTc -> HsSplicedThing GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsSplicedThing GhcTc -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsSplicedThing GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsSplicedThing GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsSplicedThing GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsSplicedThing GhcTc -> m (HsSplicedThing GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSplicedThing GhcTc -> m (HsSplicedThing GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSplicedThing GhcTc -> m (HsSplicedThing GhcTc) Source #
Data (HsSplicedThing GhcRn) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsSplicedThing GhcRn -> c (HsSplicedThing GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsSplicedThing GhcRn) Source # toConstr :: HsSplicedThing GhcRn -> Constr Source # dataTypeOf :: HsSplicedThing GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsSplicedThing GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsSplicedThing GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> HsSplicedThing GhcRn -> HsSplicedThing GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsSplicedThing GhcRn -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsSplicedThing GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsSplicedThing GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsSplicedThing GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsSplicedThing GhcRn -> m (HsSplicedThing GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSplicedThing GhcRn -> m (HsSplicedThing GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSplicedThing GhcRn -> m (HsSplicedThing GhcRn) Source #
Data (HsSplicedThing GhcPs) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsSplicedThing GhcPs -> c (HsSplicedThing GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsSplicedThing GhcPs) Source # toConstr :: HsSplicedThing GhcPs -> Constr Source # dataTypeOf :: HsSplicedThing GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsSplicedThing GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsSplicedThing GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> HsSplicedThing GhcPs -> HsSplicedThing GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsSplicedThing GhcPs -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsSplicedThing GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsSplicedThing GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsSplicedThing GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsSplicedThing GhcPs -> m (HsSplicedThing GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSplicedThing GhcPs -> m (HsSplicedThing GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSplicedThing GhcPs -> m (HsSplicedThing GhcPs) Source #
(p ~ GhcPass pass, OutputableBndrId p) => Outputable (HsSplicedThing p) # |
Instance details Defined in HsExpr Methods ppr :: HsSplicedThing p -> SDoc # pprPrec :: Rational -> HsSplicedThing p -> SDoc #

type SplicePointName = Name #

data PendingRnSplice #

Pending Renamer Splice

Constructors

PendingRnSplice UntypedSpliceFlavour SplicePointName (LHsExpr GhcRn) |

Instances

Data PendingRnSplice # |
Instance details Defined in HsInstances 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 # |
Instance details Defined in HsExpr Methods ppr :: PendingRnSplice -> SDoc # pprPrec :: Rational -> PendingRnSplice -> SDoc #

data UntypedSpliceFlavour #

Constructors

UntypedExpSplice |
UntypedPatSplice |
UntypedTypeSplice |
UntypedDeclSplice |

Instances

Data UntypedSpliceFlavour # |
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 #

Pending Type-checker Splice

Constructors

PendingTcSplice SplicePointName (LHsExpr GhcTc) |

Instances

Data PendingTcSplice # |
Instance details Defined in HsInstances 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 # |
Instance details Defined in HsExpr Methods ppr :: PendingTcSplice -> SDoc # pprPrec :: Rational -> PendingTcSplice -> SDoc #

pprPendingSplice :: OutputableBndrId (GhcPass p) => SplicePointName -> LHsExpr (GhcPass p) -> SDoc #

pprSpliceDecl :: OutputableBndrId (GhcPass p) => HsSplice (GhcPass p) -> SpliceExplicitFlag -> SDoc #

ppr_splice_decl :: OutputableBndrId (GhcPass p) => HsSplice (GhcPass p) -> SDoc #

pprSplice :: OutputableBndrId (GhcPass p) => HsSplice (GhcPass p) -> SDoc #

ppr_quasi :: OutputableBndr p => p -> p -> FastString -> SDoc #

ppr_splice :: OutputableBndrId (GhcPass p) => SDoc -> IdP (GhcPass p) -> LHsExpr (GhcPass p) -> SDoc -> SDoc #

data HsBracket p #

Haskell Bracket

Constructors

ExpBr (XExpBr p) (LHsExpr p) |
PatBr (XPatBr p) (LPat p) |
DecBrL (XDecBrL p) [LHsDecl p] |
DecBrG (XDecBrG p) (HsGroup p) |
TypBr (XTypBr p) (LHsType p) |
VarBr (XVarBr p) Bool (IdP p) |
TExpBr (XTExpBr p) (LHsExpr p) |
XBracket (XXBracket p) |

Instances

Data (HsBracket GhcTc) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsBracket GhcTc -> c (HsBracket GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsBracket GhcTc) Source # toConstr :: HsBracket GhcTc -> Constr Source # dataTypeOf :: HsBracket GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsBracket GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsBracket GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> HsBracket GhcTc -> HsBracket GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsBracket GhcTc -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsBracket GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsBracket GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsBracket GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsBracket GhcTc -> m (HsBracket GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsBracket GhcTc -> m (HsBracket GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsBracket GhcTc -> m (HsBracket GhcTc) Source #
Data (HsBracket GhcRn) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsBracket GhcRn -> c (HsBracket GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsBracket GhcRn) Source # toConstr :: HsBracket GhcRn -> Constr Source # dataTypeOf :: HsBracket GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsBracket GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsBracket GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> HsBracket GhcRn -> HsBracket GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsBracket GhcRn -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsBracket GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsBracket GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsBracket GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsBracket GhcRn -> m (HsBracket GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsBracket GhcRn -> m (HsBracket GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsBracket GhcRn -> m (HsBracket GhcRn) Source #
Data (HsBracket GhcPs) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsBracket GhcPs -> c (HsBracket GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsBracket GhcPs) Source # toConstr :: HsBracket GhcPs -> Constr Source # dataTypeOf :: HsBracket GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsBracket GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsBracket GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> HsBracket GhcPs -> HsBracket GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsBracket GhcPs -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsBracket GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsBracket GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsBracket GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsBracket GhcPs -> m (HsBracket GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsBracket GhcPs -> m (HsBracket GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsBracket GhcPs -> m (HsBracket GhcPs) Source #
(p ~ GhcPass pass, OutputableBndrId p) => Outputable (HsBracket p) # |
Instance details Defined in HsExpr Methods ppr :: HsBracket p -> SDoc # pprPrec :: Rational -> HsBracket p -> SDoc #

isTypedBracket :: HsBracket id -> Bool #

pprHsBracket :: OutputableBndrId (GhcPass p) => HsBracket (GhcPass p) -> SDoc #

thBrackets :: SDoc -> SDoc -> SDoc #

thTyBrackets :: SDoc -> SDoc #

data ArithSeqInfo id #

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

Data (ArithSeqInfo GhcTc) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ArithSeqInfo GhcTc -> c (ArithSeqInfo GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ArithSeqInfo GhcTc) Source # toConstr :: ArithSeqInfo GhcTc -> Constr Source # dataTypeOf :: ArithSeqInfo GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ArithSeqInfo GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ArithSeqInfo GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> ArithSeqInfo GhcTc -> ArithSeqInfo GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ArithSeqInfo GhcTc -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ArithSeqInfo GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ArithSeqInfo GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ArithSeqInfo GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ArithSeqInfo GhcTc -> m (ArithSeqInfo GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ArithSeqInfo GhcTc -> m (ArithSeqInfo GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ArithSeqInfo GhcTc -> m (ArithSeqInfo GhcTc) Source #
Data (ArithSeqInfo GhcRn) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ArithSeqInfo GhcRn -> c (ArithSeqInfo GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ArithSeqInfo GhcRn) Source # toConstr :: ArithSeqInfo GhcRn -> Constr Source # dataTypeOf :: ArithSeqInfo GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ArithSeqInfo GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ArithSeqInfo GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> ArithSeqInfo GhcRn -> ArithSeqInfo GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ArithSeqInfo GhcRn -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ArithSeqInfo GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ArithSeqInfo GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ArithSeqInfo GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ArithSeqInfo GhcRn -> m (ArithSeqInfo GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ArithSeqInfo GhcRn -> m (ArithSeqInfo GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ArithSeqInfo GhcRn -> m (ArithSeqInfo GhcRn) Source #
Data (ArithSeqInfo GhcPs) # |
Instance details Defined in HsInstances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ArithSeqInfo GhcPs -> c (ArithSeqInfo GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ArithSeqInfo GhcPs) Source # toConstr :: ArithSeqInfo GhcPs -> Constr Source # dataTypeOf :: ArithSeqInfo GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ArithSeqInfo GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ArithSeqInfo GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> ArithSeqInfo GhcPs -> ArithSeqInfo GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ArithSeqInfo GhcPs -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ArithSeqInfo GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ArithSeqInfo GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ArithSeqInfo GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ArithSeqInfo GhcPs -> m (ArithSeqInfo GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ArithSeqInfo GhcPs -> m (ArithSeqInfo GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ArithSeqInfo GhcPs -> m (ArithSeqInfo GhcPs) Source #
(p ~ GhcPass pass, OutputableBndrId p) => Outputable (ArithSeqInfo p) # |
Instance details Defined in HsExpr Methods ppr :: ArithSeqInfo p -> SDoc # pprPrec :: Rational -> ArithSeqInfo p -> SDoc #

pp_dotdot :: SDoc #

data HsMatchContext id #

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 mc_fun :: Located id function binder of `f` mc_fixity :: LexicalFixity fixing of `f` mc_strictness :: SrcStrictness was `f` banged? See Note [FunBind vs PatBind]
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
PatBindGuards | Guards of pattern bindings, e.g., (Just b) | Just _ <- x = e | otherwise = 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 # |
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) # |
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) # |
Instance details Defined in HsExpr Methods ppr :: HsMatchContext id -> SDoc # pprPrec :: Rational -> HsMatchContext id -> SDoc #

isPatSynCtxt :: HsMatchContext id -> Bool #

data HsStmtContext id #

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

Constructors

ListComp |
MonadComp |
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 # |
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) # |
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) # |
Instance details Defined in HsExpr Methods ppr :: HsStmtContext p -> SDoc # pprPrec :: Rational -> HsStmtContext p -> SDoc #

isListCompExpr :: HsStmtContext id -> Bool #

isMonadFailStmtContext :: HsStmtContext id -> Bool #

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

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 :: (OutputableBndrId (GhcPass idR), Outputable (NameOrRdrName (NameOrRdrName (IdP (GhcPass idR)))), Outputable body) => Match (GhcPass idR) body -> SDoc #

pprStmtInCtxt :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR), Outputable body) => HsStmtContext (IdP (GhcPass idL)) -> StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc #