import HsSyn as Hs
( HsExpr(..), HsLit(..), ArithSeqInfo(..),
- HsStmtContext(..),
+ HsStmtContext(..), TyClDecl(..),
Match(..), GRHSs(..), GRHS(..), HsPred(..),
- HsDecl(..), InstDecl(..), ConDecl(..),
+ HsDecl(..), TyClDecl(..), InstDecl(..), ConDecl(..),
Stmt(..), HsBinds(..), MonoBinds(..), Sig(..),
Pat(..), HsConDetails(..), HsOverLit, BangType(..),
placeHolderType, HsType(..), HsTupCon(..),
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?
cvtclause :: Meta.Clause (Meta.Pat) (Meta.Exp) (Meta.Dec) -> Hs.Match RdrName
-cvtclause (ps,body,wheres) = Match (map cvtp ps) Nothing
- (GRHSs (cvtguard body) (cvtdecs wheres) void)
+cvtclause (Clause ps body wheres)
+ = Match (map cvtp ps) Nothing (GRHSs (cvtguard body) (cvtdecs wheres) void)
cvtm :: Meta.Mat -> Hs.Match RdrName
-cvtm (p,body,wheres) = Match [cvtp p] Nothing
- (GRHSs (cvtguard body) (cvtdecs wheres) void)
+cvtm (Mat p body wheres)
+ = Match [cvtp p] Nothing (GRHSs (cvtguard body) (cvtdecs wheres) void)
cvtguard :: Meta.Rhs -> [GRHS RdrName]
cvtguard (Guarded pairs) = map cvtpair pairs