1
1
mirror of https://github.com/anoma/juvix.git synced 2025-01-05 22:46:08 +03:00
juvix/tests/VampIR/positive/Compilation/test009.juvix
Łukasz Czajka d576111241
VampIR integration (#2103)
* 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>
2023-05-22 20:18:18 +02:00

22 lines
477 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 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);