Copyright | (c) Kimiyuki Onaka 2020 |
---|---|
License | Apache License 2.0 |
Maintainer | kimiyuki95@gmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- run :: (MonadAlpha m, MonadError Error m) => Program -> m Program
Documentation
run :: (MonadAlpha m, MonadError Error m) => Program -> m Program Source #
run
makes a given program A-normal form.
A program is an A-normal form iff assigned exprs of all let-statements are values or function applications.
For example, this converts the following:
(let x = 1 in x) + ((fun y -> y) 1)
to:
let x = 1 in let f = fun y -> y in let z = f x in z