summaryrefslogtreecommitdiff
path: root/test/genericmake.myr
blob: 819dc822ff7c265d95a137111fcd5cb777d797e7 (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 = %i\n", v)
	| `std.None:	std.die("Unreachable\n")
	;;
}