Unary minus binds more tightly than exponentiation #1322
Labels
language
Changes or extensions to the language
low-hanging fruit
For issues that should be easy to fix
parser
Issues with lexing or parsing.
According to usual math conventions,
- x ^^ y
should parse as- (x ^^ y)
.However, in Cryptol this is parsed instead as
(- x) ^^ y
, which surprising, inconsistent, and not useful, especially when used with an even exponent. It is inconsistent because the binary minus operator binds more loosely than exponentiation, so that e.g.w - x ^^ y
parses asw - (x ^^ y)
.The text was updated successfully, but these errors were encountered: