MaintainerCS 131, Programming Languages (Melissa O'Neill, Chris Stone, Ben Wiedermann)
Safe HaskellSafe

Transforms

Description

You do not need to edit this file, nor do you need to even read it, if you don't want. But you might find it interesting anyway.

Synopsis

Documentation

freeVars :: Expr -> Set VarName #

The set of free variables in a Moses expression

desugar :: Expr -> Expr #

Desugars a Moses expression to lambda calculus + macros for builtin Moses functions.

sktrans :: Expr -> Expr #

Transform applications to use combinators

sksimplify :: Expr -> Expr #

Simplify a Moses expression that uses combinators

We can simplify B, C, or K if they're fully applied. We can also do eta reduction.

C f g x --> (f x) g B f g x --> f (g x) K k any --> k S f g x -> (f x) (g x) -- <-- don't do this one though!