summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBrian Campbell2020-01-17 11:36:59 +0000
committerBrian Campbell2020-01-17 11:36:59 +0000
commit1b8a2638551f78d60c8d066a92263674bf018bf0 (patch)
tree7614125d2044e4d10af2293d3cbdff80b790aa6d /test
parent0ccf65b2f786175c49d2e569cf8e335566734e47 (diff)
parent59c4c187bc669e7f0ee2721066101457136a9c1b (diff)
Merge branch 'coq-bool-props' into sail2
Diffstat (limited to 'test')
-rw-r--r--test/coq/pass/booltyparam.sail11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/coq/pass/booltyparam.sail b/test/coq/pass/booltyparam.sail
new file mode 100644
index 00000000..423c2720
--- /dev/null
+++ b/test/coq/pass/booltyparam.sail
@@ -0,0 +1,11 @@
+/* Test a boolean type parameter. Not sure that this is terribly useful,
+ but it fills a gap in coverage... */
+
+$include <prelude.sail>
+
+union perhaps('b : Bool) = {No : unit, Yes : {'n, 'b. atom('n)}}
+
+val foo : forall 'n. atom('n) -> perhaps('n >= 0)
+
+function foo(n) =
+ if n >= 0 then Yes(n) else No()