[GHC] #11596: ghci gets confused if a file is deleted
GHC
ghc-devs at haskell.org
Wed Feb 17 21:04:38 UTC 2016
#11596: ghci gets confused if a file is deleted
-------------------------------------+-------------------------------------
Reporter: NeilMitchell | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: GHCi | Version: 8.0.1-rc2
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
With GHC 8.0 RC2 if a currently loaded .hs file is deleted then
{{{:reload}}} works, but actual execution of anything is broken. In
previous versions this situation resulted in an error at {{{:reload}}}
time. Below is a session that demonstrate the bug:
{{{
$ ghci A.hs
GHCi, version 8.0.0.20160205: http://www.haskell.org/ghc/ :? for help
[1 of 2] Compiling B ( B.hs, interpreted )
[2 of 2] Compiling A ( A.hs, interpreted )
Ok, modules loaded: A, B.
*A> :!cat A.hs
module A where
import B
a = b + 1
*A> :!cat B.hs
module B where
b = 41
*A> :!mv B.hs B.txt
*A> :r
Ok, modules loaded: A.
*A> :show modules
A ( A.hs, interpreted )
*A> a
<interactive>: fatal:
cannot find object file for module `B'
while linking an interpreted expression
*A> :r
Ok, modules loaded: A.
}}}
Specifically, I load A.hs, which depends on B.hs. I move B.hs away (or
delete it). I reload and it says everything is fine. I try to run and it
fails. Putting the B.hs file back solves it. This sequence worked fine in
all previous versions of GHC, and is caught by the
[https://github.com/ndmitchell/ghcid ghcid] test suite.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11596>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list