mirror of
https://github.com/anoma/juvix.git
synced 2025-01-08 08:39:26 +03:00
2baad15a41
* Enables new function syntax in local let-declarations * Closes #2251
20 lines
379 B
Plaintext
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;
|