shithub: mc

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