1
1
mirror of https://github.com/anoma/juvix.git synced 2025-01-05 22:46:08 +03:00
juvix/tests/VampIR/positive/Core/test011.jvc
Łukasz Czajka 336a934d18
Normalization by Evaluation (#2038)
* Closes #2032.
* Adds the `juvix dev core normalize` command.
* Adds the `:n` command in JuvixCore REPL.
* Adds the `--normalize` flag to `juvix dev core read` and `juvix dev
core from-concrete`.
* Adds `pipeline-normalize` which denotes pipeline steps necessary
before normalization.
* Adds normalization tests in `tests/VampIR/positive/Core`.
2023-05-15 18:01:40 +02:00

11 lines
295 B
Plaintext

-- functions returning functions with variable capture
def f : Int -> Int -> Int := \(x : Int)
if x = 6 then \(x : Int) 0
else if x = 5 then \(x : Int) 1
else if x = 10 then \(y : Int) (\(x : Int) x) 2
else \(x : Int) x;
\(x : Int) \(y : Int) \(z : Int)
f x y + f y x + f z x + f 11 x