[GHC] #8029: batch-mode recompilation checking sometimes fails
GHC
ghc-devs at haskell.org
Tue Jul 2 11:01:11 CEST 2013
#8029: batch-mode recompilation checking sometimes fails
-----------------------------+----------------------------------------------
Reporter: jwlato | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.6.3 | Keywords: recompilation, batch-mode
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Blockedby:
Blocking: | Related:
-----------------------------+----------------------------------------------
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.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/8029>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list