I am trying to write out the execution of the recursive calls in mkDList example for different size lists. Is there a way in ghc, or ghci where for a given list I can see the intermediate recursive and evaluation steps?
Have you tried stepping through the code using the GHCi debugger?