Slurp the usages information lazilly from the interface file. In most
cases we don't need it at all: we only use it when we're loading a
module's interface file to check whether the module needs recompiling.
put_ bh (vers_module (mi_version iface))
put_ bh (mi_orphan iface)
-- no: mi_boot
put_ bh (vers_module (mi_version iface))
put_ bh (mi_orphan iface)
-- no: mi_boot
- put_ bh (map importVersionNameToOccName (mi_usages iface))
+ lazyPut bh (map importVersionNameToOccName (mi_usages iface))
put_ bh (vers_exports (mi_version iface),
map exportItemToRdrExportItem (mi_exports iface))
put_ bh (declsToVersionedDecls (dcl_tycl (mi_decls iface))
put_ bh (vers_exports (mi_version iface),
map exportItemToRdrExportItem (mi_exports iface))
put_ bh (declsToVersionedDecls (dcl_tycl (mi_decls iface))
lazyPut bh (vers_rules (mi_version iface), dcl_rules (mi_decls iface))
lazyPut bh (deprecsToIfaceDeprecs (mi_deprecs iface))
lazyPut bh (vers_rules (mi_version iface), dcl_rules (mi_decls iface))
lazyPut bh (deprecsToIfaceDeprecs (mi_deprecs iface))
- -- Read in an a ParsedIface, not a ModIface. See above.
+ -- Read in as a ParsedIface, not a ModIface. See above.
get bh = error "Binary.get: ModIface"
declsToVersionedDecls :: [RenamedTyClDecl] -> NameEnv Version
get bh = error "Binary.get: ModIface"
declsToVersionedDecls :: [RenamedTyClDecl] -> NameEnv Version
put_ bh pkg_name
put_ bh module_ver
put_ bh orphan
put_ bh pkg_name
put_ bh module_ver
put_ bh orphan
put_ bh exports
put_ bh tycl_decls
put_ bh fixities
put_ bh exports
put_ bh tycl_decls
put_ bh fixities
pkg_name <- get bh
module_ver <- get bh
orphan <- get bh
pkg_name <- get bh
module_ver <- get bh
orphan <- get bh
- usages <- get bh
- exports <- get bh
- tycl_decls <- get bh
- fixities <- get bh
- insts <- get bh
- rules <- lazyGet bh
- deprecs <- lazyGet bh
+ usages <- {-# SCC "bin_usages" #-} lazyGet bh
+ exports <- {-# SCC "bin_exports" #-} get bh
+ tycl_decls <- {-# SCC "bin_tycldecls" #-} get bh
+ fixities <- {-# SCC "bin_fixities" #-} get bh
+ insts <- {-# SCC "bin_insts" #-} get bh
+ rules <- {-# SCC "bin_rules" #-} lazyGet bh
+ deprecs <- {-# SCC "bin_deprecs" #-} lazyGet bh
return (ParsedIface {
pi_mod = module_name,
pi_pkg = pkg_name,
return (ParsedIface {
pi_mod = module_name,
pi_pkg = pkg_name,