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

/* checks that parameterized types work. exits with 0. */
type option(@a) = union
	`Some @a::(integral,numeric)
	`None
;;

const main = {
	var v

	v = `Some 123
	match v
	| `None:	std.exit(1)
	| `Some 123:	std.exit(0)
	;;
	std.exit(60)
}