summaryrefslogtreecommitdiff
path: root/test/matchbind.myr
blob: 8d56185903335787a720f3a591aaf4f0e72d3ecf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
type u = union
	`Int int
	`Chr char
	`Nil
;;

const main = {
	var v

	v = `Int 11
	match v
	`Int 127:
		-> 42
		;;
	`Int (var x):
		-> x
		;;
	`Chr 'a':
		-> 4
		;;
	`Nil:
		-> 6
		;;
	;;
}