debugging - Printing out Haskell's evaluation (rewriting) steps for educational/learning purposes. Is it possible? -



debugging - Printing out Haskell's evaluation (rewriting) steps for educational/learning purposes. Is it possible? -

i describe question using illustration book.

in simon thompson's book "haskell craft of functional programming" on page 82 (see images below) shown evaluation steps fac 4.

question:

is possible utilize tool or "haskell debugger" write out evaluation steps ghci uses when evaluate value of fac 4 ?

preferably in human readable format, educational , learning purposes.

it have automatic explanation each evaluation step, illustration equation used in rewriting step.

my main purpose gain deeper understanding of how rewriting steps carried out when run simple educational haskell illustration programs (like fac).

is there way ? if yes, how ?

yes , no. haven't seen tool yet line-by-line evaluation depicted in textbook - because haskell programm no "rewriting" of expressions.

however, there tool visualize haskell's actual evaluation strategy, step step: ghc-vis. instead of evaluating result , displaying on console ghci does, displays graphical representation of unevaluated result - , can forcefulness evaluation of thunk thunk, until arrive @ primitive values , structures.

as illustration of can do, here's evaluation until 3rd list fellow member of infinite fibonacci sequence:

source: examples section of project website. should have @ of them!

debugging haskell evaluation

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -