title: Printing out Haskell's evaluation (rewriting) steps for educational/learning purposes. Is it possible?
body: <p>I describe this question by using an example from a book.</p>
  
  <p>In Simon Thompson's book "HASKELL the craft of functional programming" on page 82 (see images below) are shown the evaluation steps for <code>fac 4</code>.</p>
  
  <p><strong>QUESTION:</strong></p>
  
  <p>Is it possible to use some tool or some "Haskell debugger" that would write out the evaluation steps that GHCi uses when it would evaluate the value of <code>fac 4</code> ?</p>
  
  <p>Preferably in a human readable format, for educational and learning purposes.</p>
  
  <p>It would be also good to have some automatic explanation for each evaluation step, for example which equation was used in the rewriting step. </p>
  
  <p>My main purpose is to gain a deeper understanding of how the rewriting steps are carried out when I run simple educational Haskell example programs (like <code>fac</code>).</p>
  
  <p>Is there a way to do this ? If yes, how ?</p>
  
  <p><img src="https://i.stack.imgur.com/YCfzz.jpg" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/roXaA.jpg" alt="enter image description here"></p>