summaryrefslogtreecommitdiff
path: root/test/genericmake.myr
blob: ab148fc39e55fd9bb50fcb773b777597bc13611b (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
	| `Some v:	std.put("val = {}\n", v)
	| `None:	std.die("Unreachable\n")
	;;
}