Plutonomicon / plutarch-plutus

Typed eDSL for writing UPLC /ˈpluː.tɑːk/
MIT License
124 stars 64 forks source link

Add fixity for `PNum` operators #609

Closed maciej-bendkowski closed 1 year ago

maciej-bendkowski commented 1 year ago

PNum operators have no fixity, and hence expressions such as

2 #+ 3 #* 4

are legal, while counter-intuitive as their Haskell-level equivalent Num operator do have fixity. The current PR proposes to fix that issue by adding explicit infix _ 6 to each of the operators. That way GHC can catch some precedence bugs, as above.