mirror of
https://github.com/anoma/juvix.git
synced 2025-01-05 22:46:08 +03:00
d576111241
* Closes #2035 * Depends on #2086 * Depends on #2096 * Adds end-to-end tests for the Juvix-to-VampIR compilation pipeline. --------- Co-authored-by: Jonathan Cubides <jonathan.cubides@uib.no>
22 lines
477 B
Plaintext
22 lines
477 B
Plaintext
-- applications with lets and cases in function position
|
||
module test009;
|
||
|
||
open import Stdlib.Prelude;
|
||
|
||
f : Nat -> ((Nat -> Nat) -> Nat -> Nat) × Nat → Nat;
|
||
f a l := (case l
|
||
| (x, zero) := x
|
||
| _ := id)
|
||
(let
|
||
y : Nat → Nat;
|
||
y := id;
|
||
in (let
|
||
z : (Nat → Nat) → Nat → Nat;
|
||
z := id;
|
||
in (case l | (_, zero) := id | _ := id) z)
|
||
y)
|
||
a;
|
||
|
||
main : Nat -> Nat -> Nat -> Nat;
|
||
main a b c := f a (λ{| x y := x y + b}, c);
|