X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fiface%2FMkIface.lhs;h=43bae8fba69d5c17a5e590d305b2151c9fcb71b2;hb=7eb5e29b4a7b6fef55512bc7bf3308e712ca3eba;hp=f972a91f3d8c6182acf2a15e68767842598f8159;hpb=0cdde9d7cdad657a1d0841b39410774801c69556;p=ghc-hetmet.git diff --git a/compiler/iface/MkIface.lhs b/compiler/iface/MkIface.lhs index f972a91..43bae8f 100644 --- a/compiler/iface/MkIface.lhs +++ b/compiler/iface/MkIface.lhs @@ -233,6 +233,7 @@ import ListSetOps import Control.Monad import Data.List import Data.IORef +import System.FilePath \end{code} @@ -413,7 +414,7 @@ mkIface_ hsc_env maybe_old_iface mi_fix_fn = mkIfaceFixCache fixities } -- Add version information - ; ext_ver_fn = mkParentVerFun hsc_env eps + ; ext_ver_fn = mkParentVerFun hsc_env eps ; (new_iface, no_change_at_all, pp_diffs, pp_orphs) = {-# SCC "versioninfo" #-} addVersionInfo ext_ver_fn maybe_old_iface @@ -465,7 +466,7 @@ mkIface_ hsc_env maybe_old_iface ----------------------------- writeIfaceFile :: DynFlags -> ModLocation -> ModIface -> IO () writeIfaceFile dflags location new_iface - = do createDirectoryHierarchy (directoryOf hi_file_path) + = do createDirectoryHierarchy (takeDirectory hi_file_path) writeBinIface dflags hi_file_path new_iface where hi_file_path = ml_hi_file location @@ -708,6 +709,8 @@ computeChangedOccs ver_fn this_module old_usages eq_info -- return True if an external name has changed name_changed :: Name -> Bool name_changed nm + | isWiredInName nm -- Wired-in things don't get into interface + = False -- files and hence don't get into the ver_fn | Just ents <- lookupUFM usg_modmap (moduleName mod), Just v <- lookupUFM ents parent_occ = v < new_version @@ -727,7 +730,7 @@ computeChangedOccs ver_fn this_module old_usages eq_info usg_modmap = listToUFM [ (usg_name usg, listToUFM (usg_entities usg)) | usg <- old_usages ] - get_local_eq_info :: GenIfaceEq NameSet -> GenIfaceEq OccSet + get_local_eq_info :: GenIfaceEq Name -> GenIfaceEq OccName get_local_eq_info Equal = Equal get_local_eq_info NotEqual = NotEqual get_local_eq_info (EqBut ns) = foldNameSet f Equal ns @@ -757,12 +760,7 @@ computeChangedOccs ver_fn this_module old_usages eq_info where (occs, iface_eqs) = unzip pairs add_changes so_far other = so_far -type OccIfaceEq = GenIfaceEq OccSet - -instance Outputable OccIfaceEq where - ppr Equal = ptext SLIT("Equal") - ppr NotEqual = ptext SLIT("NotEqual") - ppr (EqBut occset) = ptext SLIT("EqBut") <+> ppr (occSetElts occset) +type OccIfaceEq = GenIfaceEq OccName changedWrt :: OccSet -> OccIfaceEq -> Bool changedWrt so_far Equal = False