comments, retab

This commit is contained in:
dons 2005-12-25 23:43:27 +00:00
parent 2fb0826f23
commit 3db2f02a2c
2 changed files with 6 additions and 6 deletions

View File

@ -258,14 +258,13 @@ unify obj incs args ty sym = do
let nm = mkModid (basename tmpf) let nm = mkModid (basename tmpf)
src = mkTest nm (hierize' . mkModid . hierize $ obj) src = mkTest nm (hierize' . mkModid . hierize $ obj)
(fst $ break (=='.') ty) ty sym (fst $ break (=='.') ty) ty sym
is = map (\s -> "-i"++s) incs -- api is = map ("-i"++) incs -- api
i = "-i" ++ dirname obj -- plugin i = "-i" ++ dirname obj -- plugin
hWrite hdl src hWrite hdl src
e <- build tmpf tmpf1 (i:is++args++["-fno-code","-ohi "++tmpf1]) e <- build tmpf tmpf1 (i:is++args++["-fno-code","-ohi "++tmpf1])
-- removeFile tmpf mapM_ removeFile [tmpf,tmpf1]
removeFile tmpf1
return e return e
where where

View File

@ -292,6 +292,8 @@ build :: FilePath -- ^ path to .hs source
build src obj extra_opts = do build src obj extra_opts = do
let odir = dirname obj -- always put the .hi file next to the .o file let odir = dirname obj -- always put the .hi file next to the .o file
-- does this work in the presence of hier plugins?
-- won't handle hier names properly.
let ghc_opts = [ "-Onot" ] let ghc_opts = [ "-Onot" ]
output = [ "-o", obj, "-odir", odir, output = [ "-o", obj, "-odir", odir,
@ -299,7 +301,6 @@ build src obj extra_opts = do
let flags = ghc_opts ++ output ++ extra_opts ++ [src] let flags = ghc_opts ++ output ++ extra_opts ++ [src]
#if DEBUG #if DEBUG
-- env. -- env.
putStr $ show $ ghc : flags putStr $ show $ ghc : flags
@ -354,8 +355,8 @@ mergeTo src stb out = rawMerge src stb out False
-- directory. -- directory.
mergeToDir :: FilePath -> FilePath -> FilePath -> IO MergeStatus mergeToDir :: FilePath -> FilePath -> FilePath -> IO MergeStatus
mergeToDir src stb dir = do mergeToDir src stb dir = do
out <- mkUniqueIn dir out <- mkUniqueIn dir
rawMerge src stb out True rawMerge src stb out True
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
-- Conditional on file modification times, merge a src file with a -- Conditional on file modification times, merge a src file with a