[project @ 2001-01-03 14:38:08 by simonmar]
authorsimonmar <unknown>
Wed, 3 Jan 2001 14:38:08 +0000 (14:38 +0000)
committersimonmar <unknown>
Wed, 3 Jan 2001 14:38:08 +0000 (14:38 +0000)
When looking for an hi-boot file, look for "M.hi-boot" regardless of
which way we're compiling, rather than "M.<hi-suf>-boot" as it was
before.

Now the libs are hapily compiling for profiling.

ghc/compiler/rename/RnHiFiles.lhs

index 03016e7..ee10b6f 100644 (file)
@@ -17,6 +17,7 @@ module RnHiFiles (
 
 #include "HsVersions.h"
 
+import DriverUtil      ( splitFilename )
 import CmdLineOpts     ( opt_IgnoreIfacePragmas )
 import HscTypes                ( ModuleLocation(..),
                          ModIface(..), emptyModIface,
@@ -504,9 +505,10 @@ mkHiPath hi_boot_file locn
        if b then returnRn hi_boot_ver_path
             else returnRn hi_boot_path
   | otherwise    = returnRn hi_path
-       where (Just hi_path)   = ml_hi_file locn
-             hi_boot_path     = hi_path ++ "-boot"
-             hi_boot_ver_path = hi_path ++ "-boot-" ++ cHscIfaceFileVersion
+       where (Just hi_path)    = ml_hi_file locn
+             (hi_base, hi_suf) = splitFilename hi_path
+             hi_boot_path      = hi_base ++ ".hi-boot"
+             hi_boot_ver_path  = hi_base ++ ".hi-boot-" ++ cHscIfaceFileVersion
 \end{code}
 
 @readIface@ tries just the one file.