summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBrian Campbell2019-03-20 15:38:31 +0000
committerBrian Campbell2019-03-20 15:38:43 +0000
commita8c9a4d2baec6329c3cf486978baa180068034d3 (patch)
tree8a082112afcaf82cb23564bfb41a407df38eb337 /test
parentc7e5eae97e75036d700ba437a5c295c6fb3874a4 (diff)
Coq: be more careful about merging Sail variables and type variables
In particular, spot variable shadowing and handle (n as 'm) patterns.
Diffstat (limited to 'test')
-rw-r--r--test/coq/pass/rebind.sail10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/coq/pass/rebind.sail b/test/coq/pass/rebind.sail
new file mode 100644
index 00000000..247c1d6d
--- /dev/null
+++ b/test/coq/pass/rebind.sail
@@ -0,0 +1,10 @@
+default Order dec
+
+$include <prelude.sail>
+
+val foo : forall 'n, 'n >= 0. (int('n),bits('n)) -> bits(5 + 'n)
+
+function foo(n,x) = {
+ let (n as 'm) = 5 in
+ (append((x : bits('n)),sail_ones(n)) : bits('m + 'n))
+}