[project @ 2002-12-10 02:34:21 by igloo]
authorigloo <unknown>
Tue, 10 Dec 2002 02:34:22 +0000 (02:34 +0000)
committerigloo <unknown>
Tue, 10 Dec 2002 02:34:22 +0000 (02:34 +0000)
Correctly convert expressions from TH datastructures to the internel Hs*
datastructures containing right infix operators left-parenthesised.

ghc/compiler/hsSyn/Convert.lhs

index 0a0d64b..858d914 100644 (file)
@@ -123,7 +123,8 @@ cvt (Do ss)   = HsDo DoExpr (cvtstmts ss) [] void loc0
 cvt (Comp ss)     = HsDo ListComp (cvtstmts ss) [] void loc0
 cvt (ArithSeq dd) = ArithSeqIn (cvtdd dd)
 cvt (ListExp xs)  = ExplicitList void (map cvt xs)
-cvt (Infix (Just x) s (Just y)) = OpApp (cvt x) (HsVar(vName s)) undefined (cvt y)
+cvt (Infix (Just x) s (Just y))
+    = HsPar (OpApp (cvt x) (HsVar(vName s)) undefined (cvt y))
 cvt (Infix Nothing  s (Just y)) = SectionR (HsVar(vName s)) (cvt y)
 cvt (Infix (Just x) s Nothing ) = SectionL (cvt x) (HsVar(vName s))
 cvt (Infix Nothing  s Nothing ) = HsVar(vName s) -- Can I indicate this is an infix thing?