title: Use GHCi breakpoint debugger to find intermediate results?
body: <p>Is it possible to stop the GHCi debugger when the result of a function is known?</p>
  
  <p>For example, consider the following snippet of code:</p>
  
  <pre><code>blabla    :: [Int] -&gt; Int
  bla       :: Int -&gt; Int
  papperlap :: Int -&gt; Int -&gt; Int
  
  bla x         = x+x
  papperlap y x = ((y *) . bla) x
  blabla xs     = foldl papperlap 0 x
  </code></pre>
  
  <p>Now, I would like to see the results of 'papperlap' and 'bla'. But remember I want to stop when the result is evaluated. Therefore using ':force' is out of the question since it changes the order of evaluation.</p>
  
  <p>When I use ':break' the debugger stops but _result is not yet evaluated yet. Please find my GHCi session below, which does not yield the desired intermediate results:</p>
  
  <pre><code>GHCi, version 7.6.3: http://www.haskell.org/ghc/  :? for help
  Loading package ghc-prim ... linking ... done.
  Loading package integer-gmp ... linking ... done.
  Loading package base ... linking ... done.
  [1 of 1] Compiling Main             ( bla1.hs, interpreted )
  Ok, modules loaded: Main.
  *Main&gt; :break blabla
  Breakpoint 0 activated at bla1.hs:7:1-36
  *Main&gt; :break papperlap
  Breakpoint 1 activated at bla1.hs:6:1-31
  *Main&gt; :break bla
  Breakpoint 2 activated at bla1.hs:5:1-19
  *Main&gt; blabla [1,2,3]
  Stopped at bla1.hs:7:1-36
  _result :: Int = _
  [bla1.hs:7:1-36] *Main&gt; :step
  Stopped at bla1.hs:7:17-36
  _result :: Int = _
  xs :: [Int] = [1,2,3]
  [bla1.hs:7:17-36] *Main&gt; :step
  Stopped at bla1.hs:6:1-31
  _result :: Int = _
  [bla1.hs:6:1-31] *Main&gt; :step
  Stopped at bla1.hs:6:17-31
  _result :: Int = _
  x :: Int = 3
  y :: Int = _
  [bla1.hs:6:17-31] *Main&gt; :step
  Stopped at bla1.hs:6:1-31
  _result :: Int = _
  [bla1.hs:6:1-31] *Main&gt; :step
  Stopped at bla1.hs:6:17-31
  _result :: Int = _
  x :: Int = 2
  y :: Int = _
  [bla1.hs:6:17-31] *Main&gt; :step
  Stopped at bla1.hs:6:1-31
  _result :: Int = _
  [bla1.hs:6:1-31] *Main&gt; :step
  Stopped at bla1.hs:6:17-31
  _result :: Int = _
  x :: Int = 1
  y :: Int = 0
  [bla1.hs:6:17-31] *Main&gt; :step
  Stopped at bla1.hs:5:1-19
  _result :: Int = _
  [bla1.hs:5:1-19] *Main&gt; :step
  Stopped at bla1.hs:5:17-19
  _result :: Int = _
  x :: Int = 1
  [bla1.hs:5:17-19] *Main&gt; :step
  Stopped at bla1.hs:5:1-19
  _result :: Int = _
  [bla1.hs:5:1-19] *Main&gt; :step
  Stopped at bla1.hs:5:17-19
  _result :: Int = _
  x :: Int = 2
  [bla1.hs:5:17-19] *Main&gt; :step
  Stopped at bla1.hs:5:1-19
  _result :: Int = _
  [bla1.hs:5:1-19] *Main&gt; :step
  Stopped at bla1.hs:5:17-19
  _result :: Int = _
  x :: Int = 3
  [bla1.hs:5:17-19] *Main&gt; :step
  0
  *Main&gt;
  </code></pre>