From 3db2f02a2c3f6e6a923084b633f21df3349ce337 Mon Sep 17 00:00:00 2001 From: dons Date: Sun, 25 Dec 2005 23:43:27 +0000 Subject: [PATCH] comments, retab --- src/System/Plugins/Load.hs | 5 ++--- src/System/Plugins/Make.hs | 7 ++++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/System/Plugins/Load.hs b/src/System/Plugins/Load.hs index 1daab7c..a081a8d 100644 --- a/src/System/Plugins/Load.hs +++ b/src/System/Plugins/Load.hs @@ -258,14 +258,13 @@ unify obj incs args ty sym = do let nm = mkModid (basename tmpf) src = mkTest nm (hierize' . mkModid . hierize $ obj) (fst $ break (=='.') ty) ty sym - is = map (\s -> "-i"++s) incs -- api + is = map ("-i"++) incs -- api i = "-i" ++ dirname obj -- plugin hWrite hdl src e <- build tmpf tmpf1 (i:is++args++["-fno-code","-ohi "++tmpf1]) - -- removeFile tmpf - removeFile tmpf1 + mapM_ removeFile [tmpf,tmpf1] return e where diff --git a/src/System/Plugins/Make.hs b/src/System/Plugins/Make.hs index 5f17722..d5f413e 100644 --- a/src/System/Plugins/Make.hs +++ b/src/System/Plugins/Make.hs @@ -292,6 +292,8 @@ build :: FilePath -- ^ path to .hs source build src obj extra_opts = do 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" ] output = [ "-o", obj, "-odir", odir, @@ -299,7 +301,6 @@ build src obj extra_opts = do let flags = ghc_opts ++ output ++ extra_opts ++ [src] - #if DEBUG -- env. putStr $ show $ ghc : flags @@ -354,8 +355,8 @@ mergeTo src stb out = rawMerge src stb out False -- directory. mergeToDir :: FilePath -> FilePath -> FilePath -> IO MergeStatus mergeToDir src stb dir = do - out <- mkUniqueIn dir - rawMerge src stb out True + out <- mkUniqueIn dir + rawMerge src stb out True -- --------------------------------------------------------------------- -- Conditional on file modification times, merge a src file with a