shithub: mc

ref: b6cc5894e7c326a0dccb27f7b8347dbe56df6595
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")
	;;
}