Commit d482ad51 authored by igloo's avatar igloo

[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.
parent e97a7996
......@@ -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?
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment