Commit 35bdec7a authored by chak@cse.unsw.edu.au.'s avatar chak@cse.unsw.edu.au.
Browse files

Complete OccName->FS change in TcIface

Mon Sep 18 17:27:42 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
  * Complete OccName->FS change in TcIface
  Mon Aug  7 13:03:26 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
    * Complete OccName->FS change in TcIface
parent 00a259f5
......@@ -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
......
......@@ -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}
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