There is no general way to merge expressions into any point-free quote, but this particular case can be implemented as follows:
composeQ :: ExpQ -> ExpQ -> ExpQ composeQ = flip infixApp [|(.)|]
Here was a flip infixApp , which usually takes parameters in the order left op right to op left right , and then provides it with a composition operator. Now we have a point-free function equivalent to the original composeQ .
source share