#1468: :browse should browse currently loaded module
----------------------------------+-----------------------------------------
    Reporter:  [EMAIL PROTECTED]  |        Owner:             
        Type:  feature request    |       Status:  new        
    Priority:  low                |    Milestone:  6.8 branch 
   Component:  GHCi               |      Version:  6.6.1      
    Severity:  trivial            |   Resolution:             
    Keywords:                     |   Difficulty:  Easy (1 hr)
          Os:  Unknown            |     Testcase:             
Architecture:  Unknown            |  
----------------------------------+-----------------------------------------
Comment (by claus):

 starting somewhere in 6.7, you can define something like that yourself.
 the trick is to have a :redir command that allows you to capture ghci
 command output. then you simply do :show modules, capture the output, and
 grab one of the modules listed there for :browse.

 add the attached cmds.ghci to your .ghci, or source it with :cmd readFile
 "cmds.ghci". then, :b <mod> will call :browse <mod>, and just :b will call
 :browse on the first module listed in :show modules. adapt the code to
 your needs.

 there is a patch pending for ghc head that will allow us to avoid having
 to compress ghci definitions into single lines, which will make things
 like this a lot more readable and maintainable..

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1468>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to