mirror of
https://github.com/anoma/juvix.git
synced 2024-11-30 05:42:26 +03:00
161a34c36b
* Closes #2769 * Removes old case syntax * Pretty printing doesn't print braces in `case` if the `case` is a "top" expression in a definition.
24 lines
332 B
Plaintext
24 lines
332 B
Plaintext
module AliasRecordConstructor;
|
|
|
|
type A := a;
|
|
|
|
type T := mkT {field : A};
|
|
|
|
syntax alias mkT' := mkT;
|
|
|
|
t : T :=
|
|
mkT'@{
|
|
field := a
|
|
};
|
|
|
|
t1 : T -> A
|
|
| mkT'@{field := x} := x;
|
|
|
|
syntax iterator it {init := 0; range := 1};
|
|
it : (A → A) → T → A
|
|
| _ (mkT a) := a;
|
|
|
|
syntax alias it' := it;
|
|
|
|
t2 (t : T) : A := it' (a in t) a;
|