From 35bdec7ae3bc2d0d2d2821bd9145d3b53f0e44e8 Mon Sep 17 00:00:00 2001 From: Manuel M T Chakravarty Date: Wed, 20 Sep 2006 18:23:42 +0000 Subject: [PATCH] Complete OccName->FS change in TcIface Mon Sep 18 17:27:42 EDT 2006 Manuel M T Chakravarty * Complete OccName->FS change in TcIface Mon Aug 7 13:03:26 EDT 2006 Manuel M T Chakravarty * Complete OccName->FS change in TcIface --- compiler/iface/IfaceSyn.lhs | 2 +- compiler/iface/TcIface.lhs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/compiler/iface/IfaceSyn.lhs b/compiler/iface/IfaceSyn.lhs index e01cc31..330a6fc 100644 --- a/compiler/iface/IfaceSyn.lhs +++ b/compiler/iface/IfaceSyn.lhs @@ -195,7 +195,7 @@ data IfaceNote = IfaceSCC CostCentre | IfaceCoreNote String type IfaceAlt = (IfaceConAlt, [FastString], IfaceExpr) - -- Note: OccName, not IfaceBndr (and same with the case binder) + -- Note: FastString, not IfaceBndr (and same with the case binder) -- We reconstruct the kind/type of the thing from the context -- thus saving bulk in interface files diff --git a/compiler/iface/TcIface.lhs b/compiler/iface/TcIface.lhs index 90bedd9..e72742b 100644 --- a/compiler/iface/TcIface.lhs +++ b/compiler/iface/TcIface.lhs @@ -53,7 +53,8 @@ import Var ( TyVar, mkTyVar, tyVarKind ) import Name ( Name, nameModule, nameIsLocalOrFrom, isWiredInName, nameOccName, wiredInNameTyThing_maybe ) import NameEnv -import OccName ( OccName, mkVarOccFS, mkTyVarOccoccNameSpace, pprNameSpace, occNameFS ) +import OccName ( OccName, mkVarOccFS, mkTyVarOcc, occNameSpace, + pprNameSpace, occNameFS ) import FastString ( FastString ) import Module ( Module, moduleName ) import UniqFM ( lookupUFM ) @@ -452,7 +453,7 @@ tcIfaceDataCons tycon_name tycon tc_tyvars if_cons tcIfaceEqSpec spec = mapM do_item spec where - do_item (occ, if_ty) = do { tv <- tcIfaceTyVar occ + do_item (occ, if_ty) = do { tv <- tcIfaceTyVar (occNameFS occ) ; ty <- tcIfaceType if_ty ; return (tv,ty) } \end{code} @@ -680,8 +681,9 @@ tcIfaceAlt (tycon, inst_tys) (IfaceTupleAlt boxity, arg_occs, rhs) tcIfaceDataAlt con inst_tys arg_strs rhs = do { us <- newUniqueSupply ; let uniqs = uniqsFromSupply us - ; let (ex_tvs, co_tvs, arg_ids) = dataConRepFSInstPat (map occNameFS arg_strs) uniqs con inst_tys - all_tvs = ex_tvs ++ co_tvs + ; let (ex_tvs, co_tvs, arg_ids) = + dataConRepFSInstPat arg_strs uniqs con inst_tys + all_tvs = ex_tvs ++ co_tvs ; rhs' <- extendIfaceTyVarEnv all_tvs $ extendIfaceIdEnv arg_ids $ @@ -967,7 +969,5 @@ mk_iface_tyvar :: Name -> IfaceKind -> IfL TyVar mk_iface_tyvar name ifKind = do { kind <- tcIfaceType ifKind ; return (mkTyVar name kind) } - -mk_iface_tyvar name kind = mkTyVar name kind \end{code} -- 1.7.10.4