mirror of
https://github.com/anoma/juvix.git
synced 2024-11-30 14:13:27 +03:00
98b1daec7d
Print JuvixCore InfoTable in such a way that it can be parsed back by the JuvixCore parser. * Depends on PR #1832 * Depends on PR #1862 * Closes #1841 * Adds "JuvixCore print" tests which read the files from Core/positive/*.jvc, print them, read them back and check if the evaluation results are preserved. --------- Co-authored-by: Jan Mas Rovira <janmasrovira@gmail.com>
13 lines
304 B
Plaintext
13 lines
304 B
Plaintext
-- Match with higher-order polymorphic functions
|
|
type Box {
|
|
mkBox : Π A : Type, A → Box A;
|
|
};
|
|
|
|
def tt : Π A : Type, (Int → A) → Box A → Int :=
|
|
λ(A : Type) λ(f : Int → A) λ(l : Box A)
|
|
match (l : Box A) with : Int {
|
|
mkBox _ _ := f 33
|
|
};
|
|
|
|
tt Int ((+) 2) (mkBox Int 1)
|