fixing a bug of removeMainTarget.

If CPP is specified, a temprary file name was used.
This commit is contained in:
Kazu Yamamoto 2014-03-31 12:32:00 +09:00
parent 159b7b1eb6
commit ac45c24e3a
1 changed files with 4 additions and 1 deletions

View File

@ -136,7 +136,10 @@ checkStx set ls readLog file = do
case mx of
Nothing -> return Nothing
Just x -> do
let mainfile = G.ms_hspp_file x
let mmainfile = G.ml_hs_file (G.ms_location x)
-- G.ms_hspp_file x is a temporary file with CPP.
-- this is a just fake.
mainfile = fromMaybe (G.ms_hspp_file x) mmainfile
if mainfile == file then
return Nothing
else do