#1873: ghci loses pre-error context after :reload
---------------------+------------------------------------------------------
Reporter: claus | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 6.8.2
Component: GHCi | Version: 6.9
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Unknown
Os: Unknown |
---------------------+------------------------------------------------------
Comment (by simonmar):
The simple proposal, as I understand it, is to remember the "desired
context", and always try to set that after `:reload`. A reload wouldn't
change the desired context. That seems simple enough.
For the general proposal, I have a couple of comments:
* it's rare that you want more than one `*`-module in the context, I
think,
because name clashes will be common. The context after a `:load`
should
therefore be a single `*`-module: pick the rightmost target (this
is what we currently do, I think).
* We could distinguish external package modules from home-package
modules in the context. Saying `import M` where `M` is a package
module
should add `M` persistently to the context, surviving over a `:load`,
`:reload` and `:add`. This can never fail unless the package flags
are changed.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1873#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs