shithub: mc

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