summaryrefslogtreecommitdiff
path: root/test/genericmake.myr
blob: 8b6768b3b98e893d6cbb0e301353b4e77312f4d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use std

type t(@ty) = union
	`Some @ty
	`None
;;

const make = {v
	-> `Some v
}

const main = {
	var x

	x = make(123)
	match x
	| `std.Some v:	std.put("val = {}\n", v)
	| `std.None:	std.die("Unreachable\n")
	;;
}