ghc-6.10.4: The GHC APIContentsIndex
HsExpr
Contents
Currently used only for CmdTop (sigh) ***
Before the renamer, this list is noSyntaxTable
After the renamer, it takes the form [(std_name, HsVar actual_name)]
After the type checker, it takes the form [(std_name, expression)]
Synopsis
type LHsExpr id = Located (HsExpr id)
type PostTcExpr = HsExpr Id
type PostTcTable = [(Name, Id)]
noPostTcExpr :: PostTcExpr
noPostTcTable :: PostTcTable
type SyntaxExpr id = HsExpr id
noSyntaxExpr :: SyntaxExpr id
type SyntaxTable id = [(Name, SyntaxExpr id)]
noSyntaxTable :: SyntaxTable id
data HsExpr id
= HsVar id
| HsIPVar (IPName id)
| HsOverLit (HsOverLit id)
| HsLit HsLit
| HsLam (MatchGroup id)
| HsApp (LHsExpr id) (LHsExpr id)
| OpApp (LHsExpr id) (LHsExpr id) Fixity (LHsExpr id)
| NegApp (LHsExpr id) (SyntaxExpr id)
| HsPar (LHsExpr id)
| SectionL (LHsExpr id) (LHsExpr id)
| SectionR (LHsExpr id) (LHsExpr id)
| HsCase (LHsExpr id) (MatchGroup id)
| HsIf (LHsExpr id) (LHsExpr id) (LHsExpr id)
| HsLet (HsLocalBinds id) (LHsExpr id)
| HsDo (HsStmtContext Name) [LStmt id] (LHsExpr id) PostTcType
| ExplicitList PostTcType [LHsExpr id]
| ExplicitPArr PostTcType [LHsExpr id]
| ExplicitTuple [LHsExpr id] Boxity
| RecordCon (Located id) PostTcExpr (HsRecordBinds id)
| RecordUpd (LHsExpr id) (HsRecordBinds id) [DataCon] [PostTcType] [PostTcType]
| ExprWithTySig (LHsExpr id) (LHsType id)
| ExprWithTySigOut (LHsExpr id) (LHsType Name)
| ArithSeq PostTcExpr (ArithSeqInfo id)
| PArrSeq PostTcExpr (ArithSeqInfo id)
| HsSCC FastString (LHsExpr id)
| HsCoreAnn FastString (LHsExpr id)
| HsBracket (HsBracket id)
| HsBracketOut (HsBracket Name) [PendingSplice]
| HsSpliceE (HsSplice id)
| HsQuasiQuoteE (HsQuasiQuote id)
| HsProc (LPat id) (LHsCmdTop id)
| HsArrApp (LHsExpr id) (LHsExpr id) PostTcType HsArrAppType Bool
| HsArrForm (LHsExpr id) (Maybe Fixity) [LHsCmdTop id]
| HsTick Int [id] (LHsExpr id)
| HsBinTick Int Int (LHsExpr id)
| HsTickPragma (FastString, (Int, Int), (Int, Int)) (LHsExpr id)
| EWildPat
| EAsPat (Located id) (LHsExpr id)
| EViewPat (LHsExpr id) (LHsExpr id)
| ELazyPat (LHsExpr id)
| HsType (LHsType id)
| HsWrap HsWrapper (HsExpr id)
type PendingSplice = (Name, LHsExpr Id)
pprLExpr :: OutputableBndr id => LHsExpr id -> SDoc
pprExpr :: OutputableBndr id => HsExpr id -> SDoc
isQuietHsExpr :: HsExpr id -> Bool
pprBinds :: (OutputableBndr idL, OutputableBndr idR) => HsLocalBindsLR idL idR -> SDoc
ppr_lexpr :: OutputableBndr id => LHsExpr id -> SDoc
ppr_expr :: OutputableBndr id => HsExpr id -> SDoc
pprCmdArg :: OutputableBndr id => HsCmdTop id -> SDoc
pa_brackets :: SDoc -> SDoc
pprDebugParendExpr :: OutputableBndr id => LHsExpr id -> SDoc
pprParendExpr :: OutputableBndr id => LHsExpr id -> SDoc
isAtomicHsExpr :: HsExpr id -> Bool
type HsCmd id = HsExpr id
type LHsCmd id = LHsExpr id
data HsArrAppType
= HsHigherOrderApp
| HsFirstOrderApp
type LHsCmdTop id = Located (HsCmdTop id)
data HsCmdTop id = HsCmdTop (LHsCmd id) [PostTcType] PostTcType (SyntaxTable id)
type HsRecordBinds id = HsRecFields id (LHsExpr id)
data MatchGroup id = MatchGroup [LMatch id] PostTcType
type LMatch id = Located (Match id)
data Match id = Match [LPat id] (Maybe (LHsType id)) (GRHSs id)
isEmptyMatchGroup :: MatchGroup id -> Bool
matchGroupArity :: MatchGroup id -> Arity
hsLMatchPats :: LMatch id -> [LPat id]
data GRHSs id = GRHSs [LGRHS id] (HsLocalBinds id)
type LGRHS id = Located (GRHS id)
data GRHS id = GRHS [LStmt id] (LHsExpr id)
pprMatches :: (OutputableBndr idL, OutputableBndr idR) => HsMatchContext idL -> MatchGroup idR -> SDoc
pprFunBind :: (OutputableBndr idL, OutputableBndr idR) => idL -> Bool -> MatchGroup idR -> SDoc
pprPatBind :: (OutputableBndr bndr, OutputableBndr id) => LPat bndr -> GRHSs id -> SDoc
pprMatch :: (OutputableBndr idL, OutputableBndr idR) => HsMatchContext idL -> Match idR -> SDoc
pprGRHSs :: (OutputableBndr idL, OutputableBndr idR) => HsMatchContext idL -> GRHSs idR -> SDoc
pprGRHS :: (OutputableBndr idL, OutputableBndr idR) => HsMatchContext idL -> GRHS idR -> SDoc
pp_rhs :: OutputableBndr idR => HsMatchContext idL -> LHsExpr idR -> SDoc
type LStmt id = Located (StmtLR id id)
type LStmtLR idL idR = Located (StmtLR idL idR)
type Stmt id = StmtLR id id
data GroupByClause id
= GroupByNothing (LHsExpr id)
| GroupBySomething (Either (LHsExpr id) (SyntaxExpr id)) (LHsExpr id)
data StmtLR idL idR
= BindStmt (LPat idL) (LHsExpr idR) (SyntaxExpr idR) (SyntaxExpr idR)
| ExprStmt (LHsExpr idR) (SyntaxExpr idR) PostTcType
| LetStmt (HsLocalBindsLR idL idR)
| ParStmt [([LStmt idL], [idR])]
| TransformStmt ([LStmt idL], [idR]) (LHsExpr idR) (Maybe (LHsExpr idR))
| GroupStmt ([LStmt idL], [(idR, idR)]) (GroupByClause idR)
| RecStmt [LStmtLR idL idR] [idR] [idR] [PostTcExpr] (DictBinds idR)
pprStmt :: (OutputableBndr idL, OutputableBndr idR) => StmtLR idL idR -> SDoc
pprGroupByClause :: OutputableBndr id => GroupByClause id -> SDoc
pprDo :: OutputableBndr id => HsStmtContext any -> [LStmt id] -> LHsExpr id -> SDoc
pprComp :: OutputableBndr id => (SDoc -> SDoc) -> [LStmt id] -> LHsExpr id -> SDoc
data HsSplice id = HsSplice id (LHsExpr id)
pprSplice :: OutputableBndr id => HsSplice id -> SDoc
data HsBracket id
= ExpBr (LHsExpr id)
| PatBr (LPat id)
| DecBr (HsGroup id)
| TypBr (LHsType id)
| VarBr id
pprHsBracket :: OutputableBndr id => HsBracket id -> SDoc
thBrackets :: SDoc -> 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 id Bool
| CaseAlt
| LambdaExpr
| ProcExpr
| PatBindRhs
| RecUpd
| StmtCtxt (HsStmtContext id)
data HsStmtContext id
= ListComp
| DoExpr
| MDoExpr PostTcTable
| PArrComp
| PatGuard (HsMatchContext id)
| ParStmtCtxt (HsStmtContext id)
| TransformStmtCtxt (HsStmtContext id)
isDoExpr :: HsStmtContext id -> Bool
isListCompExpr :: HsStmtContext id -> Bool
matchSeparator :: HsMatchContext id -> SDoc
pprMatchContext :: Outputable id => HsMatchContext id -> SDoc
pprStmtContext :: Outputable id => HsStmtContext id -> SDoc
matchContextErrString :: Outputable id => HsMatchContext id -> String
pprMatchInCtxt :: (OutputableBndr idL, OutputableBndr idR) => HsMatchContext idL -> Match idR -> SDoc
pprStmtInCtxt :: (OutputableBndr idL, OutputableBndr idR) => HsStmtContext idL -> StmtLR idL idR -> SDoc
Documentation
type LHsExpr id = Located (HsExpr id)
type PostTcExpr = HsExpr Id
type PostTcTable = [(Name, Id)]
noPostTcExpr :: PostTcExpr
noPostTcTable :: PostTcTable
type SyntaxExpr id = HsExpr id
noSyntaxExpr :: SyntaxExpr id
type SyntaxTable id = [(Name, SyntaxExpr id)]
Currently used only for CmdTop (sigh) ***
Before the renamer, this list is noSyntaxTable
After the renamer, it takes the form [(std_name, HsVar actual_name)]
After the type checker, it takes the form [(std_name, expression)]
noSyntaxTable :: SyntaxTable id
data HsExpr id
Constructors
HsVar id
HsIPVar (IPName id)
HsOverLit (HsOverLit id)
HsLit HsLit
HsLam (MatchGroup id)
HsApp (LHsExpr id) (LHsExpr id)
OpApp (LHsExpr id) (LHsExpr id) Fixity (LHsExpr id)
NegApp (LHsExpr id) (SyntaxExpr id)
HsPar (LHsExpr id)
SectionL (LHsExpr id) (LHsExpr id)
SectionR (LHsExpr id) (LHsExpr id)
HsCase (LHsExpr id) (MatchGroup id)
HsIf (LHsExpr id) (LHsExpr id) (LHsExpr id)
HsLet (HsLocalBinds id) (LHsExpr id)
HsDo (HsStmtContext Name) [LStmt id] (LHsExpr id) PostTcType
ExplicitList PostTcType [LHsExpr id]
ExplicitPArr PostTcType [LHsExpr id]
ExplicitTuple [LHsExpr id] Boxity
RecordCon (Located id) PostTcExpr (HsRecordBinds id)
RecordUpd (LHsExpr id) (HsRecordBinds id) [DataCon] [PostTcType] [PostTcType]
ExprWithTySig (LHsExpr id) (LHsType id)
ExprWithTySigOut (LHsExpr id) (LHsType Name)
ArithSeq PostTcExpr (ArithSeqInfo id)
PArrSeq PostTcExpr (ArithSeqInfo id)
HsSCC FastString (LHsExpr id)
HsCoreAnn FastString (LHsExpr id)
HsBracket (HsBracket id)
HsBracketOut (HsBracket Name) [PendingSplice]
HsSpliceE (HsSplice id)
HsQuasiQuoteE (HsQuasiQuote id)
HsProc (LPat id) (LHsCmdTop id)
HsArrApp (LHsExpr id) (LHsExpr id) PostTcType HsArrAppType Bool
HsArrForm (LHsExpr id) (Maybe Fixity) [LHsCmdTop id]
HsTick Int [id] (LHsExpr id)
HsBinTick Int Int (LHsExpr id)
HsTickPragma (FastString, (Int, Int), (Int, Int)) (LHsExpr id)
EWildPat
EAsPat (Located id) (LHsExpr id)
EViewPat (LHsExpr id) (LHsExpr id)
ELazyPat (LHsExpr id)
HsType (LHsType id)
HsWrap HsWrapper (HsExpr id)
show/hide Instances
type PendingSplice = (Name, LHsExpr Id)
pprLExpr :: OutputableBndr id => LHsExpr id -> SDoc
pprExpr :: OutputableBndr id => HsExpr id -> SDoc
isQuietHsExpr :: HsExpr id -> Bool
pprBinds :: (OutputableBndr idL, OutputableBndr idR) => HsLocalBindsLR idL idR -> SDoc
ppr_lexpr :: OutputableBndr id => LHsExpr id -> SDoc
ppr_expr :: OutputableBndr id => HsExpr id -> SDoc
pprCmdArg :: OutputableBndr id => HsCmdTop id -> SDoc
pa_brackets :: SDoc -> SDoc
pprDebugParendExpr :: OutputableBndr id => LHsExpr id -> SDoc
pprParendExpr :: OutputableBndr id => LHsExpr id -> SDoc
isAtomicHsExpr :: HsExpr id -> Bool
type HsCmd id = HsExpr id
type LHsCmd id = LHsExpr id
data HsArrAppType
Constructors
HsHigherOrderApp
HsFirstOrderApp
type LHsCmdTop id = Located (HsCmdTop id)
data HsCmdTop id
Constructors
HsCmdTop (LHsCmd id) [PostTcType] PostTcType (SyntaxTable id)
show/hide Instances
type HsRecordBinds id = HsRecFields id (LHsExpr id)
data MatchGroup id
Constructors
MatchGroup [LMatch id] PostTcType
type LMatch id = Located (Match id)
data Match id
Constructors
Match [LPat id] (Maybe (LHsType id)) (GRHSs id)
isEmptyMatchGroup :: MatchGroup id -> Bool
matchGroupArity :: MatchGroup id -> Arity
hsLMatchPats :: LMatch id -> [LPat id]
data GRHSs id
Constructors
GRHSs [LGRHS id] (HsLocalBinds id)
type LGRHS id = Located (GRHS id)
data GRHS id
Constructors
GRHS [LStmt id] (LHsExpr id)
pprMatches :: (OutputableBndr idL, OutputableBndr idR) => HsMatchContext idL -> MatchGroup idR -> SDoc
pprFunBind :: (OutputableBndr idL, OutputableBndr idR) => idL -> Bool -> MatchGroup idR -> SDoc
pprPatBind :: (OutputableBndr bndr, OutputableBndr id) => LPat bndr -> GRHSs id -> SDoc
pprMatch :: (OutputableBndr idL, OutputableBndr idR) => HsMatchContext idL -> Match idR -> SDoc
pprGRHSs :: (OutputableBndr idL, OutputableBndr idR) => HsMatchContext idL -> GRHSs idR -> SDoc
pprGRHS :: (OutputableBndr idL, OutputableBndr idR) => HsMatchContext idL -> GRHS idR -> SDoc
pp_rhs :: OutputableBndr idR => HsMatchContext idL -> LHsExpr idR -> SDoc
type LStmt id = Located (StmtLR id id)
type LStmtLR idL idR = Located (StmtLR idL idR)
type Stmt id = StmtLR id id
data GroupByClause id
Constructors
GroupByNothing (LHsExpr id)
GroupBySomething (Either (LHsExpr id) (SyntaxExpr id)) (LHsExpr id)
data StmtLR idL idR
Constructors
BindStmt (LPat idL) (LHsExpr idR) (SyntaxExpr idR) (SyntaxExpr idR)
ExprStmt (LHsExpr idR) (SyntaxExpr idR) PostTcType
LetStmt (HsLocalBindsLR idL idR)
ParStmt [([LStmt idL], [idR])]
TransformStmt ([LStmt idL], [idR]) (LHsExpr idR) (Maybe (LHsExpr idR))
GroupStmt ([LStmt idL], [(idR, idR)]) (GroupByClause idR)
RecStmt [LStmtLR idL idR] [idR] [idR] [PostTcExpr] (DictBinds idR)
show/hide Instances
pprStmt :: (OutputableBndr idL, OutputableBndr idR) => StmtLR idL idR -> SDoc
pprGroupByClause :: OutputableBndr id => GroupByClause id -> SDoc
pprDo :: OutputableBndr id => HsStmtContext any -> [LStmt id] -> LHsExpr id -> SDoc
pprComp :: OutputableBndr id => (SDoc -> SDoc) -> [LStmt id] -> LHsExpr id -> SDoc
data HsSplice id
Constructors
HsSplice id (LHsExpr id)
show/hide Instances
pprSplice :: OutputableBndr id => HsSplice id -> SDoc
data HsBracket id
Constructors
ExpBr (LHsExpr id)
PatBr (LPat id)
DecBr (HsGroup id)
TypBr (LHsType id)
VarBr id
show/hide Instances
pprHsBracket :: OutputableBndr id => HsBracket id -> SDoc
thBrackets :: SDoc -> SDoc -> SDoc
data ArithSeqInfo id
Constructors
From (LHsExpr id)
FromThen (LHsExpr id) (LHsExpr id)
FromTo (LHsExpr id) (LHsExpr id)
FromThenTo (LHsExpr id) (LHsExpr id) (LHsExpr id)
show/hide Instances
pp_dotdot :: SDoc
data HsMatchContext id
Constructors
FunRhs id Bool
CaseAlt
LambdaExpr
ProcExpr
PatBindRhs
RecUpd
StmtCtxt (HsStmtContext id)
data HsStmtContext id
Constructors
ListComp
DoExpr
MDoExpr PostTcTable
PArrComp
PatGuard (HsMatchContext id)
ParStmtCtxt (HsStmtContext id)
TransformStmtCtxt (HsStmtContext id)
isDoExpr :: HsStmtContext id -> Bool
isListCompExpr :: HsStmtContext id -> Bool
matchSeparator :: HsMatchContext id -> SDoc
pprMatchContext :: Outputable id => HsMatchContext id -> SDoc
pprStmtContext :: Outputable id => HsStmtContext id -> SDoc
matchContextErrString :: Outputable id => HsMatchContext id -> String
pprMatchInCtxt :: (OutputableBndr idL, OutputableBndr idR) => HsMatchContext idL -> Match idR -> SDoc
pprStmtInCtxt :: (OutputableBndr idL, OutputableBndr idR) => HsStmtContext idL -> StmtLR idL idR -> SDoc
Produced by Haddock version 2.4.2