mirror of
https://github.com/anoma/juvix.git
synced 2025-01-08 16:51:53 +03:00
3fbc9c7c55
Closes #1644 #1635
17 lines
212 B
Plaintext
17 lines
212 B
Plaintext
module MatchConstructor;
|
|
|
|
open import Stdlib.Prelude;
|
|
|
|
type Foo :=
|
|
foo1 : Nat → Foo |
|
|
foo2 : Foo;
|
|
|
|
toNat : Foo → Nat;
|
|
toNat (foo1 n) := n;
|
|
toNat foo2 := zero;
|
|
|
|
main : Nat;
|
|
main := toNat (foo1 200);
|
|
|
|
end;
|