| License | Apache License 2.0 |
|---|---|
| Stability | experimental |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Lambda.Lambda
Description
Attempts to simplify lambda expressions.
Documentation
A lambda expression, which can either consist of a lambda, a term, or an application.
Arguments
| :: Integral a | |
| => (a -> t -> Expr s) | A function that takes, the term depth and term in ordr, and generates an expression. |
| -> a | The initial depth to use (used as a recursive parameter in code). |
| -> Expr t | The initial expression. |
| -> Expr s | The converted expression. |
Replaces the terms in a lamdba expression, using a given function and initial depth.
Arguments
| :: Integral t | |
| => t | The lamba depth of inner simplifications being done, which dictates which term should be replaced. |
| -> t | How many applications to reduce whilst doing an inner simplification: negative numbers remove the limit. |
| -> Expr t | The initial expression. |
| -> Expr t | The simplified expression. |
Simplifies a lambda expression, using two counters, meaning that inner expresions are only evaluated if outer expressions can't be evaluated.