Skip to content
Snippets Groups Projects
Commit 180097ce authored by sven.panne@aedion.de's avatar sven.panne@aedion.de
Browse files

[project @ 2000-07-03 19:48:07 by panne]

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)
parent 73657163
No related merge requests found
......@@ -487,7 +487,7 @@ horner b i | abs q <= 1 = if r == 0 || r == i then mkInt i else mkInt r `plus` m
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}
%************************************************************************
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment