| 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
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 )
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}
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 $
mk_iface_tyvar name ifKind = do { kind <- tcIfaceType ifKind
; return (mkTyVar name kind)
}
-
-mk_iface_tyvar name kind = mkTyVar name kind
\end{code}