Safe Haskell | None |
---|---|
Language | Haskell2010 |
- externals :: [External]
- betaReducePlusR :: MonadCatch m => Rewrite c m CoreExpr
- rememberR :: RememberedName -> Rewrite c HermitM Core
- showStashT :: Injection CoreDef a => PrettyC -> PrettyH a -> Transform c HermitM a DocH
- unfoldR :: forall c m. (AddBindings c, ExtendPath c Crumb, HasEmptyContext c, ReadBindings c, ReadPath c Crumb, MonadCatch m) => Rewrite c m CoreExpr
- unfoldPredR :: (AddBindings c, ExtendPath c Crumb, HasEmptyContext c, ReadBindings c, ReadPath c Crumb, MonadCatch m) => (Id -> [CoreExpr] -> Bool) -> Rewrite c m CoreExpr
- unfoldNameR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, ReadBindings c, HasEmptyContext c, MonadCatch m) => HermitName -> Rewrite c m CoreExpr
- unfoldNamesR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, ReadBindings c, HasEmptyContext c, MonadCatch m) => [HermitName] -> Rewrite c m CoreExpr
- unfoldSaturatedR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, ReadBindings c, HasEmptyContext c) => Rewrite c HermitM CoreExpr
- unfoldStashR :: ReadBindings c => RememberedName -> Rewrite c HermitM CoreExpr
- specializeR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, ReadBindings c, HasEmptyContext c) => Rewrite c HermitM CoreExpr
Documentation
betaReducePlusR :: MonadCatch m => Rewrite c m CoreExpr Source
Perform one or more beta reductions.
rememberR :: RememberedName -> Rewrite c HermitM Core Source
Stash a binding with a name for later use. Allows us to look at past definitions.
unfoldR :: forall c m. (AddBindings c, ExtendPath c Crumb, HasEmptyContext c, ReadBindings c, ReadPath c Crumb, MonadCatch m) => Rewrite c m CoreExpr Source
A more powerful inline
. Matches two cases:
Var ==> inlines
App ==> inlines the head of the function call for the app tree
unfoldPredR :: (AddBindings c, ExtendPath c Crumb, HasEmptyContext c, ReadBindings c, ReadPath c Crumb, MonadCatch m) => (Id -> [CoreExpr] -> Bool) -> Rewrite c m CoreExpr Source
unfoldNameR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, ReadBindings c, HasEmptyContext c, MonadCatch m) => HermitName -> Rewrite c m CoreExpr Source
unfoldNamesR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, ReadBindings c, HasEmptyContext c, MonadCatch m) => [HermitName] -> Rewrite c m CoreExpr Source
unfoldSaturatedR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, ReadBindings c, HasEmptyContext c) => Rewrite c HermitM CoreExpr Source
unfoldStashR :: ReadBindings c => RememberedName -> Rewrite c HermitM CoreExpr Source
Stash a binding with a name for later use. Allows us to look at past definitions. rememberR :: String -> Transform c m 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).
specializeR :: (ExtendPath c Crumb, ReadPath c Crumb, AddBindings c, ReadBindings c, HasEmptyContext c) => Rewrite c HermitM CoreExpr Source