blob: 852cebc1270f87d331cda94b3d1ae178d00c641d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
default Order dec
$include <prelude.sail>
val "print_endline" : string -> unit
enum foo = {
Bar,
Baz
}
val test : (foo, foo) -> bool
function test(x, y) =
match (x, y) {
(Baz, Baz) => false,
(Bar, Bar) => true,
(_, _) => false
}
function main() : unit -> unit = {
assert(test(Bar, Bar));
print_endline("ok")
}
|