We could further modify the AST to unbox values based on the operation being taken (thus erasing the intermediate purs_any_t altogether for e.g. addition etc.).
The issue was mistitled and was referring to the inlineCommonValues pass, which has been implemented, thus closing. Opening a new issue dedicated to inlineCommonOperators which is a bit more involved.
Implement something akin to:
https://github.com/purescript/purescript/blob/a8e0911222f46411776978a13866eb097175162c/src/Language/PureScript/CoreImp/Optimizer/Inliner.hs#L83-L107
We could further modify the AST to unbox values based on the operation being taken (thus erasing the intermediate
purs_any_t
altogether for e.g. addition etc.).