#5317: non-linear complexity of :reload combined with :module in ghci
---------------------------+------------------------------------------------
  Reporter:  SimonHengel   |          Owner:                  
      Type:  bug           |         Status:  closed          
  Priority:  normal        |      Milestone:  7.4.1           
 Component:  Compiler      |        Version:  7.0.3           
Resolution:  wontfix       |       Keywords:                  
  Testcase:                |      Blockedby:                  
Difficulty:                |             Os:  Unknown/Multiple
  Blocking:                |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown  |  
---------------------------+------------------------------------------------

Comment(by marlowsd@…):

 commit 79d6745f66c678de5e104b2146d3dd3e2f006c3e
 {{{
 Author: Simon Marlow <[email protected]>
 Date:   Fri Aug 26 16:36:05 2011 +0100

     Clean up the handling of the import and :module commands in GHCi

     Previously we remembered the whole history of commands and replayed
     them on every :load/:reload, which lead to some non-linear performance
     characteristics (#5317).  The handling of the implicit Prelude import
     and the implicit imports of recently loaded modules was also
     complicated and wrong in various obscure ways.

     The Prelude import works just like the implicit Prelude import in a
     Haskell module: it can be overriden with an explicit Prelude
     import.

     I have added a new ":show imports" command to show which imports are
     currently in force.

     Prelude> :show imports
     import Prelude -- implicit
     Prelude> import Prelude ()
     Prelude> :show imports
     import Prelude ()
     Prelude> map

     <interactive>:0:1: Not in scope: `map'
     Prelude>

     Full documentation in the User's Guide.

     There are various other little tweaks and improvements, such as when a
     module is imported with 'as', we now show the 'as' name in the prompt
     rather than the original name.

  compiler/hsSyn/HsImpExp.lhs |    2 +-
  docs/users_guide/ghci.xml   |  135 ++++++---
  ghc/GhciMonad.hs            |   39 ++--
  ghc/InteractiveUI.hs        |  733
 +++++++++++++++++++++++++------------------
  4 files changed, 543 insertions(+), 366 deletions(-)
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5317#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

Reply via email to