let a = Expr "a"
let b = Expr "b"
print $ a + b
I would like to declare the infix precedence of (+) with a function
(commented line (*)) instead of directly as above.
Is there any means to do that?
Do we need some kind of preprocessing machinery? How to do that in Haskell?
In a more general way, let us suppose I have a Haskell library able to
perform some calculations: how to use it in a pre-processing step, before
compilation of the executable? It could be a function to compute
symbolically roots of a polynomial of second degree to be used at runtime.
We would put some placeholders in the code where the result of the pre-
processing calculation would enter.