
Hi. I'm working with GHC 6.10.4 on Solaris. I'm new at Haskell and have inherited a rather large and complex program to maintain and modify. I'd like to get a listing of everything - every single step - that's done in a run of the program. Something similar to the output of the :step command, but I'd like the entire run (which would involve tens of thousands of steps). Is there a way to just do this - have it run and print everything it does to the screen? I've tried doing the following, after starting a "script" to capture all of the screen output... ghci -fglasgow-exts parsequery.hs :break 36 main which takes me to this prompt... Loading package mtl-1.1.0.2 ... linking ... done. Stopped at lesearch.hs:36:13-39 _result :: IO SearchState = _ input :: [String] = _ st :: SearchState = _ [lesearch.hs:36:13-39] *Main> This takes me to the call before the one that I want to output each step of so that I can then manually, with hardcopy, read it and get an idea of what happened. So I start a step through the next call. [lesearch.hs:36:13-39] *Main> :step process_query_loop st input Stopped at lesearch.hs:(46,0)-(69,39) _result :: IO SearchState = _ ... [lesearch.hs:(46,0)-(69,39)] *Main> So far so good. This is what I want to see - a listing like this for every (interpreted of course) line of haskell code that runs, all the way to the end. Since this is a very large program, at this point I started pasting this to the terminal - 4 steps at a time... :step :step :step :step This gave me the listing I wanted. But after a certain point, it inevitably fails with a core dump, and what I capture from the screen is garbled up to that point anyway. I'm hoping there's a simpler way to do this. Thanks for taking the time to read this. Ralph