Hi.  I&#39;m working with GHC 6.10.4 on Solaris.  I&#39;m new at Haskell and have inherited a rather large and complex program to maintain and modify.  I&#39;d like to get a listing of everything - every single step - that&#39;s done in a run of the program.  Something similar to the output of the :step command, but I&#39;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?<br>
<br>I&#39;ve tried doing the following, after starting a &quot;script&quot; to capture all of the screen output...<br><br>ghci -fglasgow-exts parsequery.hs<br>:break 36<br>main<br><br>which takes me to this prompt...<br><br>
Loading package mtl-1.1.0.2 ... linking ... done.<br>Stopped at lesearch.hs:36:13-39<br>_result :: IO SearchState = _<br>input :: [String] = _<br>st :: SearchState = _<br>[lesearch.hs:36:13-39] *Main&gt; <br><br>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.<br>
<br>So I start a step through the next call.<br><br>[lesearch.hs:36:13-39] *Main&gt; :step process_query_loop st input<br>Stopped at lesearch.hs:(46,0)-(69,39)<br>_result :: IO SearchState = _<br>... [lesearch.hs:(46,0)-(69,39)] *Main&gt; <br>
<br>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...<br>
<br>:step<br>:step<br>:step<br>:step<br><br>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&#39;m hoping there&#39;s a simpler way to do this.  Thanks for taking the time to read this.<br>
<br>Ralph<br><br><br><br>