1
1
mirror of https://github.com/anoma/juvix.git synced 2025-01-08 08:39:26 +03:00
juvix/tests/positive/MutualType.juvix
Łukasz Czajka 2baad15a41 Remove old function syntax (#2305)
* Enables new function syntax in local let-declarations
* Closes #2251
2023-08-24 16:24:47 +02:00

20 lines
379 B
Plaintext

module MutualType;
syntax fixity cons {arity: binary, assoc: right};
syntax operator :: cons;
--- Inductive list.
type List (a : Type) :=
| --- The empty list
nil : List a
| --- An element followed by a list
:: : a → List a → List a;
Forest : Type -> Type
| A := List (Tree A);
--- N-Ary tree.
type Tree (A : Type) :=
| node : A -> Forest A -> Tree A;