Commit 70bccc12 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Merge branch 'master' of http://darcs.haskell.org/ghc

parents 8ff44877 0e275ec9
......@@ -129,12 +129,6 @@ endif
@echo 'cGHC_SYSMAN_DIR = "$(GHC_SYSMAN_DIR)"' >> $@
@echo 'cDEFAULT_TMPDIR :: String' >> $@
@echo 'cDEFAULT_TMPDIR = "$(DEFAULT_TMPDIR)"' >> $@
@echo 'cRelocatableBuild :: Bool' >> $@
ifeq "$(RelocatableBuild)" "YES"
@echo 'cRelocatableBuild = True' >> $@
else
@echo 'cRelocatableBuild = False' >> $@
endif
@echo 'cLibFFI :: Bool' >> $@
ifeq "$(UseLibFFIForAdjustors)" "YES"
@echo 'cLibFFI = True' >> $@
......
......@@ -102,6 +102,7 @@ import ListSetOps
import Binary
import Fingerprint
import Bag
import Exception
import Control.Monad
import Data.List
......@@ -1324,10 +1325,19 @@ checkModUsage this_pkg UsageHomeModule{
else up_to_date (ptext (sLit " Great! The bits I use are up to date"))
checkModUsage _this_pkg UsageFile{ usg_file_path = file, usg_mtime = old_mtime } = do
new_mtime <- liftIO $ getModificationTime file
return $ old_mtime /= new_mtime
checkModUsage _this_pkg UsageFile{ usg_file_path = file,
usg_mtime = old_mtime } =
liftIO $
handleIO handle $ do
new_mtime <- getModificationTime file
return $ old_mtime /= new_mtime
where
handle =
#ifdef DEBUG
\e -> pprTrace "UsageFile" (text (show e)) $ return True
#else
\_ -> return True -- if we can't find the file, just recompile, don't fail
#endif
------------------------
checkModuleFingerprint :: Fingerprint -> Fingerprint -> IfG RecompileRequired
......
......@@ -1126,7 +1126,19 @@ setLine code span buf len = do
setFile :: Int -> Action
setFile code span buf len = do
let file = lexemeToFastString (stepOn buf) (len-2)
let file = mkFastString (go (lexemeToString (stepOn buf) (len-2)))
where go ('\\':c:cs) = c : go cs
go (c:cs) = c : go cs
go [] = []
-- decode escapes in the filename. e.g. on Windows
-- when our filenames have backslashes in, gcc seems to
-- escape the backslashes. One symptom of not doing this
-- is that filenames in error messages look a bit strange:
-- C:\\foo\bar.hs
-- only the first backslash is doubled, because we apply
-- System.FilePath.normalise before printing out
-- filenames and it does not remove duplicate
-- backslashes after the drive letter (should it?).
setAlrLastLoc $ alrInitialLoc file
setSrcLoc (mkRealSrcLoc file (srcSpanEndLine span) (srcSpanEndCol span))
addSrcFile file
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment