tweag / pirouette

Language-generic workbench for building static analysis
MIT License
47 stars 2 forks source link

Remove the hack for translating `Bool` and make it into a transformation #127

Closed VictorCMiraldo closed 2 years ago

VictorCMiraldo commented 2 years ago

In Language.Piroutte.PlutusIR.ToTerm there is the mention of a hack where we translate non-builtin booleans to builtin booleans directly. I think that having that as a hack is a bad idea: we could benefit from a dedicated transformation to remove re-defined datatypes and replace them with their respective builtins.

VictorCMiraldo commented 2 years ago

https://github.com/tweag/plutus-libs/pull/133#issuecomment-1182932751 addresses this by not using builtin booleans; the addition of the isTrue method of the LanguageSymEval class ties the knot.