1
1
mirror of https://github.com/anoma/juvix.git synced 2025-01-07 08:08:44 +03:00
juvix/tests/Compilation/positive/test037.juvix
Łukasz Czajka 019579bba2
Fix case formatting (#2387)
* Closes #2361 
* Aligns `case` and `let`
2023-09-26 10:11:46 +02:00

24 lines
481 B
Plaintext

-- Applications with lets and cases in function position
module test037;
import Stdlib.Prelude open;
f (l : List ((Nat → Nat) → Nat → Nat)) : Nat :=
case l of {
| x :: _ := x
| nil := id
}
(let
y : Nat → Nat := id;
in (let
z : (Nat → Nat) → Nat → Nat := id;
in case l of {
| _ :: _ := id
| _ := id
}
z)
y)
7;
main : IO := printNatLn (f (λ {| x y := x y + 2} :: nil));