1
1
mirror of https://github.com/anoma/juvix.git synced 2024-11-30 05:42:26 +03:00
juvix/tests/positive/MutualType.juvix
2023-11-03 12:51:45 +01:00

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;