
29 Jun
2013
29 Jun
'13
4:03 p.m.
TP wrote:
2/ If I define in a module:
j = 3
and then define in another module:
------------------- h x = $([|j|]) main = do print $ h undefined -------------------
I obtain "3" as expected.
However, I do not achieve to make this system work with an infix declaration:
infix $([| j |]) +
I obtain:
parse error on input `$('
I don't know what happens exactly, but one way to get out of this problem is to write the complete top-level declaration with a splice, instead of only the fixity level: $(return $ [ InfixD (Fixity $([| j |]) InfixN) (mkName "+") ]) Concerning my first question, I have not been able to understand what happens at this time. I continue to look at it. Thanks, TP