Using "GHC as a library" with own functions makes runStmt return RunBreak

Mads Lindstrøm mads_lindstroem at
Thu Jan 31 15:10:23 EST 2008

Mads Lindstrøm <mads_lindstroem <at>> writes:

> Hi
> I am trying to use "GHC as a library". From runStmt, I want to load and run
> functions from a home-grown module. Lets call my home-grown module 
> HomeGrown.hs.
> I have tried to model my application after 
> /
> from
> . This library loads
> MyPrelude.hs and runs myPutStrLn & myGetLine + more.
> However, when I try to run code from HomeGrown.hs like:
>   runStmt session "" GHC.SingleStep
> runStmt keeps returning RunBreak (of type RunResult). From what I can read of
> the WWW, RunBreak is related to some debugger and indicate that GHC 
> encountered
> some breakpoint. However, I did not set any break points.

For those interested I figured out how to avoid the RunBreak -returns.
Use RunToCompletion in stead of SingleStep in the application of runStmt.
I guess Interactive-6.8.hs should also use SingleStep. 


Mads Lindstrøm

More information about the Glasgow-haskell-users mailing list