Fix test breakage due to new operations in the Cryptol prelude.

This commit is contained in:
Robert Dockins 2017-08-16 17:37:24 -07:00
parent cefc67a149
commit ef047d3a19
3 changed files with 15 additions and 3 deletions

View File

@ -19,22 +19,29 @@ Symbols
(#) : {front, back,
a} (fin front) => [front]a -> [back]a -> [front + back]a
(%) : {a} (Arith a) => a -> a -> a
(%$) : {a} (Arith a) => a -> a -> a
(&&) : {a} a -> a -> a
(*) : {a} (Arith a) => a -> a -> a
(+) : {a} (Arith a) => a -> a -> a
(-) : {a} (Arith a) => a -> a -> a
(/) : {a} (Arith a) => a -> a -> a
(/$) : {a} (Arith a) => a -> a -> a
(/\) : Bit -> Bit -> Bit
(<) : {a} (Cmp a) => a -> a -> Bit
(<$) : {a} (SignedCmp a) => a -> a -> Bit
(<<) : {a, b, c} (fin b) => [a]c -> [b] -> [a]c
(<<<) : {a, b, c} (fin a, fin b) => [a]c -> [b] -> [a]c
(<=) : {a} (Cmp a) => a -> a -> Bit
(<=$) : {a} (SignedCmp a) => a -> a -> Bit
(==) : {a} (Cmp a) => a -> a -> Bit
(===) : {a, b} (Cmp b) => (a -> b) -> (a -> b) -> a -> Bit
(==>) : Bit -> Bit -> Bit
(>) : {a} (Cmp a) => a -> a -> Bit
(>$) : {a} (SignedCmp a) => a -> a -> Bit
(>=) : {a} (Cmp a) => a -> a -> Bit
(>=$) : {a} (SignedCmp a) => a -> a -> Bit
(>>) : {a, b, c} (fin b) => [a]c -> [b] -> [a]c
(>>$) : {n, k} (fin n, n >= 1, fin k) => [n] -> [k] -> [n]
(>>>) : {a, b, c} (fin a, fin b) => [a]c -> [b] -> [a]c
(@) : {a, b, c} (fin c) => [a]b -> [c] -> b
(@@) : {a, b, c, d} (fin d) => [a]b -> [c][d] -> [c]b
@ -43,6 +50,7 @@ Symbols
(\/) : Bit -> Bit -> Bit
(^) : {a} a -> a -> a
(^^) : {a} (Arith a) => a -> a -> a
carry : {n} (fin n) => [n] -> [n] -> Bit
complement : {a} a -> a
demote : {val, bits} (fin val, fin bits,
bits >= width val) => [bits]
@ -76,6 +84,9 @@ Symbols
(a + b)]
random : {a} [256] -> a
reverse : {a, b} (fin a) => [a]b -> [a]b
sborrow : {n} (fin n, n >= 1) => [n] -> [n] -> Bit
scarry : {n} (fin n, n >= 1) => [n] -> [n] -> Bit
sext : {n, m} (fin m, m >= n, n >= 1) => [n] -> [m]
split : {parts, each, a} (fin each) => [parts *
each]a -> [parts][each]a
splitAt : {front, back, a} (fin front) => [front +
@ -96,5 +107,6 @@ Symbols
width : {bits, len, elem} (fin len, fin bits,
bits >= width len) => [len]elem -> [bits]
zero : {a} a
zext : {n, m} (fin m, m >= n) => [n] -> [m]
(||) : {a} a -> a -> a

View File

@ -4,7 +4,7 @@ Loading module Main
[error] at ./issue290v2.cry:2:1--2:19:
Unsolved constraints:
a`283 == 1
a`356 == 1
arising from
checking a pattern: type of 1st argument of Main::minMax
at ./issue290v2.cry:2:8--2:11

View File

@ -25,8 +25,8 @@ Loading module test04
[error] at ./test04.cry:3:19--3:21:
Type mismatch:
Expected type: ()
Inferred type: [?l11]
Inferred type: [?g14]
where
?l11 is type parameter 'bits'
?g14 is type parameter 'bits'
of literal or demoted expression
at ./test04.cry:3:19--3:21