From 180097ce1628a67c97f54b313268600ed1756652 Mon Sep 17 00:00:00 2001
From: panne <unknown>
Date: Mon, 3 Jul 2000 19:48:07 +0000
Subject: [PATCH] [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)

---
 ghc/compiler/rename/RnExpr.lhs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ghc/compiler/rename/RnExpr.lhs b/ghc/compiler/rename/RnExpr.lhs
index 5102f544a1fc..e1125a91f94e 100644
--- a/ghc/compiler/rename/RnExpr.lhs
+++ b/ghc/compiler/rename/RnExpr.lhs
@@ -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}
 
 %************************************************************************
-- 
GitLab