mirror of
https://github.com/anoma/juvix.git
synced 2024-12-01 00:04:58 +03:00
98b3621ae1
- Closes #2269 Example: ``` type Sum (A B : Type) := | inj1 { fst : A; snd : B } | inj2 { fst : A; snd2 : B }; sumSwap {A B : Type} : Sum A B -> Sum B A | inj1@{fst; snd := y} := inj2 y fst | inj2@{snd2 := y; fst := fst} := inj1 y fst; ```
14 lines
143 B
Plaintext
14 lines
143 B
Plaintext
module RepeatedFieldPattern;
|
|
|
|
type T :=
|
|
| t;
|
|
|
|
type R :=
|
|
| mkR {
|
|
a : T;
|
|
b : T
|
|
};
|
|
|
|
f : R -> T
|
|
| mkR@{a := x; a := y} := x;
|