summaryrefslogtreecommitdiff
path: root/test/mono
diff options
context:
space:
mode:
authorAlasdair Armstrong2018-01-25 19:08:55 +0000
committerAlasdair Armstrong2018-01-25 19:08:55 +0000
commitb2d580f7154f2e0d55ac710663bde16fd074720c (patch)
tree93f0151ff5b655e8ff11639cda7166f81018707f /test/mono
parentb7e388f0193a89608687760f50e476c059f0f49c (diff)
parent98493e9de3e591d565d6d8c4f081f3dcb5346125 (diff)
Merge branch 'sail2' of https://bitbucket.org/Peter_Sewell/sail into sail2
Diffstat (limited to 'test/mono')
-rw-r--r--test/mono/assert.sail8
-rw-r--r--test/mono/assert2.sail9
2 files changed, 17 insertions, 0 deletions
diff --git a/test/mono/assert.sail b/test/mono/assert.sail
new file mode 100644
index 00000000..4b782398
--- /dev/null
+++ b/test/mono/assert.sail
@@ -0,0 +1,8 @@
+val f : forall 'n. atom('n) -> unit effect {escape}
+
+function f(n) = {
+ assert(constraint('n in {8,16}));
+ let 'm = 2 * n in
+ let x : bits('m) = replicate_bits(0b0,'m) in
+ ()
+}
diff --git a/test/mono/assert2.sail b/test/mono/assert2.sail
new file mode 100644
index 00000000..67e18f76
--- /dev/null
+++ b/test/mono/assert2.sail
@@ -0,0 +1,9 @@
+val f : forall 'n. atom('n) -> unit effect {escape}
+
+function f(n) = {
+ let 'm = 2 * n in {
+ assert(constraint('n in {8,16}));
+ let x : bits('m) = replicate_bits(0b0,'m) in
+ ()
+ }
+}