batch-mode recompilation checking sometimes fails
The batch-mode recompilation checker seems to be broken. Suppose you have a source tree with
Data/List.hs
Data/Top.hs
and Data/List.hs defining 'foo' and Data/Top.hs importing Data.List (local file). Compile Data/Top.hs, then rename Data.List so you have
Data/List.{hi,o}
Data/OtherList.hs -- exports 'foo'
Data/Top.hs -- imports Data.List and Data.OtherList
Data/Top.{hi.o}
Attempting to run 'ghc -c Data/Top.hs' will now fail with " Failed to load interface for `Data.OtherList'". This error appears to be specific to built-in modules, if I use a library module (e.g. Data.Vector from the vector package) I instead get an error that multiple definitions of 'foo' are in scope.
A test repo is available at https://github.com/JohnLato/tripping-octo-avenger
Incidentally, everything works if I use 'ghc -c --make'. I think a reasonable fix would be for --make to be on by default for batch-mode compilation as well.
Trac metadata
Trac field | Value |
---|---|
Version | 7.6.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |