shithub: mc

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