simple ghci debugger question

2008-11-27 Thread Peter Hercek

Is there a way to redirect output of a ghci debugger command
 so that I can process it with a (ghci) script before it is
 displayed?

Peter.

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: simple ghci debugger question

2008-11-27 Thread Simon Marlow

Peter Hercek wrote:

Is there a way to redirect output of a ghci debugger command
 so that I can process it with a (ghci) script before it is
 displayed?


Claus had some GHCi macros for doing this sort of thing.  Claus?

Cheers,
Simon
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: simple ghci debugger question

2008-11-27 Thread Claus Reinke

Peter Hercek wrote:

Is there a way to redirect output of a ghci debugger command
 so that I can process it with a (ghci) script before it is
 displayed?


Claus had some GHCi macros for doing this sort of thing.  Claus?


Sure, recorded here (sections 4/5, but the rest of the page should
also be better known; if only so that others would add their tips and
tricks as well; hmm, ghc-haskeline isn't there, yet):

http://www.haskell.org/haskellwiki/GHC/GHCi#Using_.ghci.2C_a_mini-tutorial

Some of the items mentioned in the tutorial email have since been
added to GHCi, but I still use the :grep, :redir, and :ghc_pkg stuff; 
:redir(Err) only works properly if -fbreak-on-exceptions is not 
switched on, haven't investigated workarounds yet.


There is also a stub page for the GHCi debugger, nothing on it yet:

http://www.haskell.org/haskellwiki/GHC/GHCi_debugger

Claus

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users