plutus
plutus copied to clipboard
Add `Lazy` and use it throughout Plutus Tx code instead of the slower `()`
We should have some kind of Lazy data type instead of using () -> in Plutus Tx, so that we can compile it to delay and force instead of juggling the slower units.
This applied to builtins too, i.e. ifThenElse, chooseList, chooseData and whatever else builtins we have shouldn't be instantiated with () ->, it should be Lazy in there.
I had some PR somewhere that was going through a uplc program and turned all unused variables (no occurences in the body) and was turning them to delay and force. I don't know where is that PR now. But your approach sounds better.
Closing in favor of #5967.