shithub: mc

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