simple ghci debugger question

Claus Reinke claus.reinke at talk21.com
Thu Nov 27 06:56:27 EST 2008


> 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



More information about the Glasgow-haskell-users mailing list