recompilation checker overeager on executables produced with -o
-- Foo.hs module Main where main :: IO () main = putStrLn "foo"
-- Bar.hs module Main where main :: IO () main = putStrLn "bar"
ghc --make Foo.hs -o hello ghc --make Bar.hs -o hello
The first runthough this is fine. Any subsequent invocation of either of the above commands won't create a new executable again, even if the existing one is for "foo" and the command is invoked with "bar" or vice-versa. My guess is it sees that the *.hi and *.o files are up to date and sees the mtime of the executable is chronologically subsequent, so doesn't account for the fact that the file being compiled to an executable could itself have been changed.
I don't know how fixable this is without always recompiling the executable, which is of course to be avoided. #13829 seems like it might be the flip-side of the same coin, so maybe fixing one also lets us fix the other...