summaryrefslogtreecommitdiff
path: root/test/c/enum_match.sail
diff options
context:
space:
mode:
Diffstat (limited to 'test/c/enum_match.sail')
-rw-r--r--test/c/enum_match.sail16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/c/enum_match.sail b/test/c/enum_match.sail
new file mode 100644
index 00000000..591e2695
--- /dev/null
+++ b/test/c/enum_match.sail
@@ -0,0 +1,16 @@
+
+val "eq_anything" : forall ('a : Type). ('a, 'a) -> bool
+
+overload operator == = {eq_anything}
+
+val print = "print_endline" : string -> unit
+
+enum test = A | B
+
+function main (() : unit) -> unit = {
+ let x = A;
+ match x {
+ B => print("B"),
+ A => print("A")
+ }
+} \ No newline at end of file