GHC.Rename.Expr

ghc-9.2.0.20210422: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.Rename.Expr

Synopsis

- rnLExpr :: LHsExpr GhcPs -> RnM (LHsExpr GhcRn, FreeVars)
- rnExpr :: HsExpr GhcPs -> RnM (HsExpr GhcRn, FreeVars)
- rnStmts :: AnnoBody body => HsStmtContext GhcRn -> (body GhcPs -> RnM (body GhcRn, FreeVars)) -> [LStmt GhcPs (LocatedA (body GhcPs))] -> ([Name] -> RnM (thing, FreeVars)) -> RnM (([LStmt GhcRn (LocatedA (body GhcRn))], thing), FreeVars)
- type AnnoBody body = (Outputable (body GhcPs), Anno (StmtLR GhcPs GhcPs (LocatedA (body GhcPs))) ~ SrcSpanAnnA, Anno (StmtLR GhcRn GhcPs (LocatedA (body GhcPs))) ~ SrcSpanAnnA, Anno (StmtLR GhcRn GhcRn (LocatedA (body GhcRn))) ~ SrcSpanAnnA)

# Documentation

rnLExpr :: LHsExpr GhcPs -> RnM (LHsExpr GhcRn, FreeVars) Source #

rnExpr :: HsExpr GhcPs -> RnM (HsExpr GhcRn, FreeVars) Source #

rnStmts Source #

Arguments

:: AnnoBody body |
=> HsStmtContext GhcRn |
-> (body GhcPs -> RnM (body GhcRn, FreeVars)) | How to rename the body of each statement (e.g. rnLExpr)
-> [LStmt GhcPs (LocatedA (body GhcPs))] | Statements
-> ([Name] -> RnM (thing, FreeVars)) | if these statements scope over something, this renames it and returns the result.
-> RnM (([LStmt GhcRn (LocatedA (body GhcRn))], thing), FreeVars) |

Rename some Stmts

type AnnoBody body = (Outputable (body GhcPs), Anno (StmtLR GhcPs GhcPs (LocatedA (body GhcPs))) ~ SrcSpanAnnA, Anno (StmtLR GhcRn GhcPs (LocatedA (body GhcPs))) ~ SrcSpanAnnA, Anno (StmtLR GhcRn GhcRn (LocatedA (body GhcRn))) ~ SrcSpanAnnA) Source #