rems-project / sail

Sail architecture definition language
Other
590 stars 103 forks source link

Built in 2^ operator requires spaces #657

Closed Timmmm closed 1 month ago

Timmmm commented 1 month ago

It's slightly odd that the built-in 2 ^ support requires spaces around ^, but if you define a custom operator ^ it doesn't. The RISC-V sail model defines operator ^ = {int_power} which means it will actually give different type checking results if you use spaces or not (because 2 ^ is understood at the type level, but int_power is just int ^ int -> int).

Alasdair commented 1 month ago

Should be fixed by https://github.com/rems-project/sail/pull/660