Putting parentheses around expressions involving a mixture of
multiplicative and additive operators might sometimes be a cunning
idea... :-} Otherwise
(
591125662431::Int) `div` (517::Int)
is correctly converted into
(
567659506 + (275 *
2147483647)) `div` 517
but
591125662431 `div` (517::Int)
turns into the messed up
567659506 + ((275 *
2147483647) `div` 517)
mkInt i = HsLit (HsInt i)
plus = mkOp "+"
times = mkOp "*"
- mkOp op = \x y -> OpApp x (HsVar (mkSrcUnqual varName (_PK_ op))) (panic "fixity") y
+ mkOp op = \x y -> HsPar (OpApp x (HsVar (mkSrcUnqual varName (_PK_ op))) (panic "fixity") y)
\end{code}
%************************************************************************