X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fiface%2FLoadIface.lhs;h=00e9e7a26f86b915ebf1a6dbb16701c86cabc941;hp=6b2660d9a41de54838e005a358da87257ece4e46;hb=7fa861d23122d4d6a3053c09b5c636bad0478ad3;hpb=1e8ae3f05cd475454f086a51da845ac0318d40e8 diff --git a/compiler/iface/LoadIface.lhs b/compiler/iface/LoadIface.lhs index 6b2660d..00e9e7a 100644 --- a/compiler/iface/LoadIface.lhs +++ b/compiler/iface/LoadIface.lhs @@ -38,6 +38,7 @@ import InstEnv import FamInstEnv import Name import NameEnv +import NameSet import MkId import Module import OccName @@ -225,7 +226,7 @@ loadInterface doc_str mod from -- -- The main thing is to add the ModIface to the PIT, but -- we also take the - -- IfaceDecls, IfaceInst, IfaceRules + -- IfaceDecls, IfaceInst, IfaceFamInst, IfaceRules, IfaceVectInfo -- out of the ModIface and put them into the big EPS pools -- NB: *first* we do loadDecl, so that the provenance of all the locally-defined @@ -244,7 +245,13 @@ loadInterface doc_str mod from mi_insts = panic "No mi_insts in PIT", mi_fam_insts = panic "No mi_fam_insts in PIT", mi_rules = panic "No mi_rules in PIT" - } } + } + ; new_eps_vect_info = + VectInfo { + vectInfoCCVar = mkNameSet + (ifaceVectInfoCCVar . mi_vect_info $ iface) + } + } ; updateEps_ $ \ eps -> eps { @@ -256,6 +263,8 @@ loadInterface doc_str mod from new_eps_insts, eps_fam_inst_env = extendFamInstEnvList (eps_fam_inst_env eps) new_eps_fam_insts, + eps_vect_info = plusVectInfo (eps_vect_info eps) + new_eps_vect_info, eps_mod_fam_inst_env = let fam_inst_env = @@ -490,6 +499,7 @@ initExternalPackageState -- Initialise the EPS rule pool with the built-in rules eps_mod_fam_inst_env = emptyModuleEnv, + eps_vect_info = noVectInfo, eps_stats = EpsStats { n_ifaces_in = 0, n_decls_in = 0, n_decls_out = 0 , n_insts_in = 0, n_insts_out = 0 , n_rules_in = length builtinRules, n_rules_out = 0 } @@ -567,7 +577,7 @@ pprModIface iface <+> ppr (mi_mod_vers iface) <+> pp_sub_vers <+> (if mi_orphan iface then ptext SLIT("[orphan module]") else empty) <+> (if mi_finsts iface then ptext SLIT("[family instance module]") else empty) - <+> int opt_HiVersion + <+> integer opt_HiVersion <+> ptext SLIT("where") , vcat (map pprExport (mi_exports iface)) , pprDeps (mi_deps iface)