[GHC] #11069: :cd in GHCi unloads modules
GHC
ghc-devs at haskell.org
Sun Nov 8 06:54:31 UTC 2015
#11069: :cd in GHCi unloads modules
-------------------------------------+-------------------------------------
Reporter: mgsloan | Owner:
Type: bug | Status: new
Priority: low | Milestone:
Component: GHCi | Version: 7.10.2
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: Other
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
If I run `stack ghci` in the [https://github.com/commercialhaskell/stack
stack] repo, and then use `:cd`, I get the following:
> Warning: changing directory causes all loaded modules to be unloaded,
> because the search path has changed.
And, indeed, all modules are unloaded. What's particularly strange about
this is that in my case all of the paths provided on the commandline are
absolute. Here's the output of ":show paths":
> current working directory:
>
> /home/mgsloan/fpco/stack
>
> module import search paths:
>
> /home/mgsloan/fpco/stack/src
>
> /home/mgsloan/fpco/stack/.stack-
work/dist/x86_64-linux/Cabal-1.22.4.0/build/autogen
>
> /home/mgsloan/fpco/stack/.stack-
work/dist/x86_64-linux/Cabal-1.22.4.0/build
>
> /home/mgsloan/fpco/stack/src/main
How about removing any dependency in GHC on the current working directory,
and instead store it when the session is initialized?
This is also necessary if we want to support per-package working
directories,
[https://ghc.haskell.org/trac/ghc/timeline?from=2015-11-08T06%3A17%3A58Z&precision=second
details here].
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11069>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list