hydra-0.5.1: Type-aware transformations for data and programs
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hydra.Reduction

Description

Functions for reducing terms and types, i.e. performing computations

Synopsis

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.

termIsClosed :: Term -> Bool Source #

Whether a term is closed, i.e. represents a complete program

termIsValue :: Graph -> Term -> Bool Source #

Whether a term has been fully reduced to a "value"