shithub: mc

ref: ff88594df5c5df6fb8f227ab8e5df3529ba6e72f
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
	| `Some v:	std.put("val = {}\n", v)
	| `None:	std.die("Unreachable\n")
	;;
}