mirror of
https://github.com/anoma/juvix.git
synced 2024-12-04 06:23:13 +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>
18 lines
389 B
Plaintext
18 lines
389 B
Plaintext
-- structural equality
|
|
|
|
type list {
|
|
nil : list;
|
|
cons : Any -> list -> list;
|
|
};
|
|
|
|
def writeLn := \x write x >> write "\n";
|
|
|
|
writeLn (1 = 1) >>
|
|
writeLn (0 = 1) >>
|
|
writeLn (nil = nil) >>
|
|
writeLn (cons 1 nil = nil) >>
|
|
writeLn (cons 1 nil = cons 2 nil) >>
|
|
writeLn (cons 1 nil = cons 1 nil) >>
|
|
writeLn (cons 1 nil = cons 1 (cons 2 nil)) >>
|
|
writeLn (cons 1 (cons 2 nil) = cons 1 (cons 2 nil))
|