Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Hydra.Reduction
Description
Functions for reducing terms and types, i.e. performing computations
Synopsis
- alphaConvert :: Name -> Term -> Term -> Term
- countPrimitiveInvocations :: Bool
- reduceTerm :: Bool -> Map Name Term -> Term -> Flow Graph Term
- betaReduceType :: Type -> Flow Graph Type
- contractTerm :: Term -> Term
- etaReduceTerm :: Term -> Term
- termIsClosed :: Term -> Bool
- termIsValue :: Graph -> Term -> Bool
Documentation
contractTerm :: Term -> Term Source #
Apply the special rules: ((x.e1) e2) == e1, where x does not appear free in e1 and ((x.e1) e2) = e1[x/e2] These are both limited forms of beta reduction which help to "clean up" a term without fully evaluating it.
etaReduceTerm :: Term -> Term Source #
termIsClosed :: Term -> Bool Source #
Whether a term is closed, i.e. represents a complete program