1
1
mirror of https://github.com/anoma/juvix.git synced 2025-01-08 16:51:53 +03:00
juvix/tests/Internal/positive/MatchConstructor.juvix

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;