Safe Haskell | None |
---|
- externals :: [External]
- cleanupUnfoldR :: RewriteH CoreExpr
- rememberR :: Label -> RewriteH Core
- showStashT :: Injection CoreDef a => PrettyH a -> TranslateH a DocH
- unfoldR :: RewriteH CoreExpr
- unfoldPredR :: (Id -> [CoreExpr] -> Bool) -> RewriteH CoreExpr
- unfoldNameR :: Name -> RewriteH CoreExpr
- unfoldAnyR :: [Name] -> RewriteH CoreExpr
- unfoldSaturatedR :: RewriteH CoreExpr
- unfoldStashR :: String -> RewriteH CoreExpr
- specializeR :: RewriteH CoreExpr
Documentation
cleanupUnfoldR :: RewriteH CoreExprSource
cleanupUnfoldR cleans a unfold operation (for example, an inline or rule application) It is used at the level of the top-redex. Invariant: will not introduce let bindings
rememberR :: Label -> RewriteH CoreSource
Stash a binding with a name for later use. Allows us to look at past definitions.
showStashT :: Injection CoreDef a => PrettyH a -> TranslateH a DocHSource
unfoldR :: RewriteH CoreExprSource
A more powerful inline
. Matches two cases:
Var ==> inlines
App ==> inlines the head of the function call for the app tree
unfoldAnyR :: [Name] -> RewriteH CoreExprSource
unfoldStashR :: String -> RewriteH CoreExprSource
Stash a binding with a name for later use. Allows us to look at past definitions. rememberR :: String -> TranslateH Core () rememberR label = contextfreeT $ core -> case core of DefCore def -> saveDef label def BindCore (NonRec i e) -> saveDef label (Def i e) _ -> fail remember: not a binding
Apply a stashed definition (like inline, but looks in stash instead of context).