cryptol/tests/regression/check24.cry
Rob Dockins e9c22ad0cf Still compute width defaulting information as before, but
use that information to emit error messages rather than warnings.

This provides more specific messages than simply allowing the
affected type variables to remain uninstantiated and failing later.
It also causes some examples that otherwise would have ambiguous
types to fail earlier.  This converts some test instances where
REPL defaulting would eventually succeed into examples that fail
outright instead.  I largely think these instances are improvements.
2020-07-02 15:04:07 -07:00

5 lines
161 B
Plaintext

xor : {a} ([a], [a]) -> [a]
xor (xs, ys) = [ x != y | x <- xs | y <- ys ]
check24 = [ xor`{4} (x, y) == (x ^ y) | x <- [ 0 .. 15 ], y <- [ 0 .. 15 ] ] == ~zero