mirror of
https://github.com/anoma/juvix.git
synced 2024-11-30 05:42:26 +03:00
47c8df11f1
- Closes #2059
19 lines
370 B
Plaintext
19 lines
370 B
Plaintext
module MutualType;
|
|
|
|
syntax fixity cons := 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;
|