Safe Haskell | None |
---|
- externals :: [External]
- alpha :: RewriteH Core
- alphaLam :: Maybe Name -> RewriteH CoreExpr
- alphaCaseBinder :: Maybe Name -> RewriteH CoreExpr
- alphaAltIds :: [Id] -> RewriteH CoreAlt
- alphaAlt :: RewriteH CoreAlt
- alphaCase :: RewriteH CoreExpr
- alphaLetVars :: [Var] -> RewriteH CoreExpr
- alphaLetRecIds :: [Id] -> RewriteH CoreExpr
- alphaLetOne :: Maybe Name -> RewriteH CoreExpr
- alphaLet :: RewriteH CoreExpr
- alphaConsOne :: Maybe Name -> RewriteH CoreProg
- alphaCons :: RewriteH CoreProg
- unshadow :: RewriteH Core
- visibleVarsT :: TranslateH CoreExpr [Var]
- freshNameGenT :: Maybe Name -> TranslateH CoreExpr (String -> String)
- freshNameGenAvoiding :: Maybe Name -> [Var] -> String -> String
- replaceVarR :: (Injection a Core, Generic a ~ Core) => Var -> Var -> RewriteH a
Alpha-Renaming and Shadowing
Alpha-Renaming
Alpha rename any bindings at this node. Note: does not rename case alternatives unless invoked on the alternative.
alphaLam :: Maybe Name -> RewriteH CoreExprSource
Alpha rename a lambda binder. Optionally takes a suggested new name.
alphaCaseBinder :: Maybe Name -> RewriteH CoreExprSource
Alpha rename a case binder. Optionally takes a suggested new name.
alphaAltIds :: [Id] -> RewriteH CoreAltSource
Rename the specified identifiers in a case alternative.
alphaLetVars :: [Var] -> RewriteH CoreExprSource
Rename the specified variables bound in a let.
alphaLetRecIds :: [Id] -> RewriteH CoreExprSource
Rename the specified identifiers bound in a recursive let.
alphaLetOne :: Maybe Name -> RewriteH CoreExprSource
Rename the identifier bound in a let with a single bound identifier. Optionally takes a suggested new name.
alphaConsOne :: Maybe Name -> RewriteH CoreProgSource
Rename the identifier bound in a top-level binder with a single bound identifier. Optionally takes a suggested new name.
Shadow Detection and Unshadowing
unshadow :: RewriteH CoreSource
Rename local variables with manifestly unique names (x, x0, x1, ...). Does not rename top-level definitions (though this may change in the future).
visibleVarsT :: TranslateH CoreExpr [Var]Source
List all visible identifiers (in the expression or the context).
freshNameGenT :: Maybe Name -> TranslateH CoreExpr (String -> String)Source
If a name is provided replace the string with that, otherwise modify the string making sure to not clash with any visible variables.