-cvt (App x y) = HsApp (cvt x) (cvt y)
-cvt (Lam ps e) = HsLam (mkSimpleMatch (map cvtp ps) (cvt e) void loc0)
-cvt (Tup [e]) = cvt e
-cvt (Tup es) = ExplicitTuple(map cvt es) Boxed
-cvt (Cond x y z) = HsIf (cvt x) (cvt y) (cvt z) loc0
-cvt (Let ds e) = HsLet (cvtdecs ds) (cvt e)
-cvt (Case e ms) = HsCase (cvt e) (map cvtm ms) loc0
-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))
- = HsPar (OpApp (cvt x) (cvt s) undefined (cvt y))
-cvt (Infix Nothing s (Just y)) = SectionR (cvt s) (cvt y)
-cvt (Infix (Just x) s Nothing ) = SectionL (cvt x) (cvt s)
-cvt (Infix Nothing s Nothing ) = cvt s -- Can I indicate this is an infix thing?
-cvt (SigExp e t) = ExprWithTySig (cvt e) (cvtType t)
-
-cvtdecs :: [Meta.Dec] -> HsBinds RdrName
-cvtdecs [] = EmptyBinds
-cvtdecs ds = MonoBind binds sigs Recursive
+cvt (AppE x y) = HsApp (cvtl x) (cvtl y)
+cvt (LamE ps e) = HsLam (mkSimpleMatch (map cvtlp ps) (cvtl e) void)
+cvt (TupE [e]) = cvt e
+cvt (TupE es) = ExplicitTuple(map cvtl es) Boxed
+cvt (CondE x y z) = HsIf (cvtl x) (cvtl y) (cvtl z)
+cvt (LetE ds e) = HsLet (cvtdecs ds) (cvtl e)
+cvt (CaseE e ms) = HsCase (cvtl e) (map cvtm ms)
+cvt (DoE ss) = HsDo DoExpr (cvtstmts ss) [] void
+cvt (CompE ss) = HsDo ListComp (cvtstmts ss) [] void
+cvt (ArithSeqE dd) = ArithSeqIn (cvtdd dd)
+cvt (ListE xs) = ExplicitList void (map cvtl xs)
+cvt (InfixE (Just x) s (Just y))
+ = HsPar (noLoc $ OpApp (cvtl x) (cvtl s) undefined (cvtl y))
+cvt (InfixE Nothing s (Just y)) = SectionR (cvtl s) (cvtl y)
+cvt (InfixE (Just x) s Nothing ) = SectionL (cvtl x) (cvtl s)
+cvt (InfixE Nothing s Nothing ) = cvt s -- Can I indicate this is an infix thing?
+cvt (SigE e t) = ExprWithTySig (cvtl e) (cvtType t)
+cvt (RecConE c flds) = RecordCon (noLoc (cName c)) (map (\(x,y) -> (noLoc (vName x), cvtl y)) flds)
+cvt (RecUpdE e flds) = RecordUpd (cvtl e) (map (\(x,y) -> (noLoc (vName x), cvtl y)) flds)
+
+cvtdecs :: [TH.Dec] -> [HsBindGroup RdrName]
+cvtdecs [] = []
+cvtdecs ds = [HsBindGroup binds sigs Recursive]