hermit-0.1.1.0: Haskell Equational Reasoning Model-to-Implementation Tunnel

Safe HaskellSafe-Infered

Language.HERMIT.Primitive.GHC

Synopsis

Documentation

safeLetSubstPlusR :: RewriteH CoreExprSource

safeLetSubstPlusR tries to inline a stack of bindings, stopping when reaches the end of the stack of lets.

freeIdsQuery :: TranslateH CoreExpr StringSource

Output a list of all free variables in an expression.

showVar :: Var -> StringSource

Show a human-readable version of a Var.

showVars :: [Var] -> StringSource

Show a human-readable version of a list of Vars.

deShadowBindsR :: RewriteH CoreProgramSource

from GHC documentation
De-shadowing the program is sometimes a useful pre-pass. It can be done simply by running over the bindings with an empty substitution, becuase substitution returns a result that has no-shadowing guaranteed.

(Actually, within a single type there might still be shadowing, because substTy is a no-op for the empty substitution, but that's probably OK.)

inScope :: Context -> Id -> BoolSource

See whether an identifier is in scope.