[Haskell-begin] invoking GHCi programtically ?

Is it possible to invoke GHCi from Haskell code? I want to achieve the following effect: have a shell script invoke runhaskell myprog.hs < input.dat and at some point (on conditions) have the prog bring me the ghci prompt GHCi Main> so I can examine my program state interctively, for example place breakpoints, run my functions piecewise? and then do GHCi Main>:continue and then have the prompt again (if conditions) GHCi Main> I did try ghci myprog.hs < input.dat Command-line arguments ghci myprog.hs a b c are similarly by ghci not acceptable In the overall, I want to have the stdin redirected from file once in the GHCi session, place breakpoints and do :step(s) with that stream in this way and cannot also do GHCi Main>:main < input.dat but in my case (I think) this not also an option since its not me but the wrapper script doing the setup. krassi

Em Sex, 2008-07-18 às 12:12 +0300, Krassimir Krustev escreveu:
Is it possible to invoke GHCi from Haskell code?
I don't know if this is what you're looking for, but it could help: http://www.cse.unsw.edu.au/~dons/code/typeof/ Greetings. -- Marco Túlio Gontijo e Silva Página: http://marcotmarcot.googlepages.com/ Blog: http://marcotmarcot.blogspot.com/ Correio: marcot@riseup.net XMPP: marcot@jabber.org IRC: marcot@irc.freenode.net Telefone: 25151920 Celular: 98116720 Endereço: Rua Turfa, 639/701 Prado 30410-370 Belo Horizonte/MG Brasil
participants (2)
-
Krassimir Krustev
-
Marco Túlio Gontijo e Silva