X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcRnDriver.lhs;h=c41367e8905b108b47923226e9d0c6dc9a38653a;hp=8cb815f73df32047a83d2b5f6deaa834d1476013;hb=311b1cdfc9b1c311cc53482c461c18cba8885b2a;hpb=8a5d47de2b82d9cca86546a7bd89d915488934ef diff --git a/compiler/typecheck/TcRnDriver.lhs b/compiler/typecheck/TcRnDriver.lhs index 8cb815f..c41367e 100644 --- a/compiler/typecheck/TcRnDriver.lhs +++ b/compiler/typecheck/TcRnDriver.lhs @@ -167,9 +167,11 @@ tcRnModule hsc_env hsc_src save_rn_syntax traceIf (text "rdr_env: " <+> ppr rdr_env) ; failIfErrsM ; - -- Load any orphan-module interfaces, so that - -- their rules and instance decls will be found - loadOrphanModules (imp_orphs imports) ; + -- Load any orphan-module and family instance-module + -- interfaces, so that their rules and instance decls will be + -- found. + loadOrphanModules (imp_orphs imports) False ; + loadOrphanModules (imp_finsts imports) True ; traceRn (text "rn1a") ; -- Rename and type check the declarations @@ -1098,9 +1100,12 @@ tcGetModuleExports :: Module -> TcM [AvailInfo] tcGetModuleExports mod = do let doc = ptext SLIT("context for compiling statements") iface <- initIfaceTcRn $ loadSysInterface doc mod - loadOrphanModules (dep_orphs (mi_deps iface)) + loadOrphanModules (dep_orphs (mi_deps iface)) False -- Load any orphan-module interfaces, -- so their instances are visible + loadOrphanModules (dep_finsts (mi_finsts iface)) True + -- Load any family instance-module interfaces, + -- so all family instances are visible ifaceExportNames (mi_exports iface) tcRnLookupRdrName :: HscEnv -> RdrName -> IO (Maybe [Name])