From: igloo Date: Tue, 10 Dec 2002 02:34:22 +0000 (+0000) Subject: [project @ 2002-12-10 02:34:21 by igloo] X-Git-Tag: Approx_11550_changesets_converted~1381 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=d482ad51c9051d6eb9fbcafd90362949db29f374;p=ghc-hetmet.git [project @ 2002-12-10 02:34:21 by igloo] Correctly convert expressions from TH datastructures to the internel Hs* datastructures containing right infix operators left-parenthesised. --- diff --git a/ghc/compiler/hsSyn/Convert.lhs b/ghc/compiler/hsSyn/Convert.lhs index 0a0d64b..858d914 100644 --- a/ghc/compiler/hsSyn/Convert.lhs +++ b/ghc/compiler/hsSyn/Convert.lhs @@ -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?