how can I run ghci monad actions from ghci command line

Peter Hercek phercek at
Wed Jan 28 10:54:52 EST 2009

Claus Reinke wrote:
> ghci-haskeline
>    This package reimplements ghci using the GHC API and the    
> Haskeline package for line input in command-line programs.
> Just a copy&modify of some of the GHCi sources, including a
> Main.hs to call the modified code.

Thanks for the information.
Ok, from the example, it looks like ghci is significantly smaller than 
the source in ghc-6.10.1/compiler/ghci directory. Hopefully my next 
changes (if any at all) will not need more than a custom ghci. The test 
I did needed also ghc change. The type of function GHC.resume changed from:
/resume :: GhcMonad m => SingleStep -> m RunResult/
/resume :: GhcMonad m => (SrcSpan->Bool) -> SingleStep -> m RunResult/
... plus the corresponding implementation change.

The added argument is a filtering function to limit source spans which 
can recorded in the trace history. I'll post more when I know how it 
changes my debugging experience.


More information about the Glasgow-haskell-users mailing list