mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-11-28 09:23:04 +03:00
Fix constraints on type of primitive intmod
.
The old type did not forbid literals of the invalid type `Z inf`.
This commit is contained in:
parent
59104829a0
commit
dda5d34131
@ -18,7 +18,7 @@ primitive integer : {val} (fin val) => Integer
|
||||
/**
|
||||
* The integer (mod n) value corresponding to a numeric type.
|
||||
*/
|
||||
primitive intmod : {val, modulus} (fin val, modulus >= val + 1) => Z modulus
|
||||
primitive intmod : {val, modulus} (fin modulus, modulus >= val + 1) => Z modulus
|
||||
|
||||
infixr 5 ==>
|
||||
infixr 10 \/
|
||||
|
@ -89,7 +89,8 @@ Symbols
|
||||
infFrom : {bits} (fin bits) => [bits] -> [inf][bits]
|
||||
infFromThen : {bits} (fin bits) => [bits] -> [bits] -> [inf][bits]
|
||||
integer : {val} (fin val) => Integer
|
||||
intmod : {val, modulus} (fin val, modulus >= 1 + val) => Z modulus
|
||||
intmod :
|
||||
{val, modulus} (fin modulus, modulus >= 1 + val) => Z modulus
|
||||
iterate : {a} (a -> a) -> a -> [inf]a
|
||||
join :
|
||||
{parts, each, a} (fin each) => [parts][each]a -> [parts * each]a
|
||||
|
Loading…
Reference in New Issue
Block a user