mirror of
https://github.com/anoma/juvix.git
synced 2025-01-08 16:51:53 +03:00
b8cd84170b
This PR updates the juvix-stdlib to the current main commit which includes: * https://github.com/anoma/juvix-stdlib/issues/59 * https://github.com/anoma/juvix-stdlib/issues/101 All the Juvix test suite files and examples in this repo have been updated to be compatible with the new stdlib.
36 lines
615 B
Plaintext
36 lines
615 B
Plaintext
-- eta-expansion of builtins and constructors
|
|
module test033;
|
|
|
|
import Stdlib.Prelude open;
|
|
|
|
f : (Nat → Nat) → Nat
|
|
| g := g 2;
|
|
|
|
f' : Nat → Nat
|
|
| x := f ((+) x);
|
|
|
|
g : (Nat → Pair Nat Nat) → Pair Nat Nat
|
|
| f := f 2;
|
|
|
|
g' : Nat → Pair Nat Nat
|
|
| x := g ((,) x);
|
|
|
|
f1' : Nat → Nat → Nat
|
|
| x y := f ((+) (div x y));
|
|
|
|
g1' : Nat → Nat → Pair Nat Nat
|
|
| x y := g ((,) (div x y));
|
|
|
|
h : (Nat → Nat → Pair Nat Nat) → Pair Nat Nat
|
|
| f := f 1 2;
|
|
|
|
main : Nat :=
|
|
f' 7
|
|
+ fst (g' 7)
|
|
+ snd (g' 7)
|
|
+ f1' 7 2
|
|
+ fst (g1' 7 2)
|
|
+ snd (g1' 7 2)
|
|
+ fst (h (,))
|
|
+ snd (h (,));
|