summaryrefslogtreecommitdiff
path: root/test/genericchain.myr
blob: 557b900f8d7c02a521225eb2e5de7634568b0ebc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std

generic fail = {val : @a
	-> `std.Some val
}

generic try = {opt : std.option(@b)
	match opt
	| `std.Some v:	-> v
	| `std.None:	std.die("Badness\n")
	;;
}

const main = {
	std.put("val = {}\n", try(fail(123)))
}