shithub: mc

ref: 49570fb00b851ce47c9b8d5280284cc44490e0e9
dir: /test/genericmake.myr/

View raw version
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")
	;;
}