takenobu-hs/lazy_evaluation

haskell lazy evaluation illustrated

72

43 commits

updated May 3, 2017

See the code

README

Lazy evaluation illustrated

for Haskell divers

This is an illustrated document about lazy evaluation in Haskell

Here is: Lazy evaluation illustrated for Haskell divers (PDF).

Contents

  1. Introduction
  • Basic mental models
  • Lazy evaluation
  • Simple questions
  1. Expressions
  • Expression and value
  • Expressions in Haskell
  • Classification by values and forms
  • WHNF
  1. Internal representation of expressions
  • Constructor
  • Thunk
  • Uniform representation
  • WHNF
  • let, case expression
  1. Evaluation
  • Evaluation strategies
  • Evaluation in Haskell (GHC)
  • Examples of evaluation steps
  • Examples of evaluations
  • Controlling the evaluation
  1. Implementation of evaluator
  • Lazy graph reduction
  • STG-machine
  1. Semantics
  • Bottom
  • Strict/Non-strict
  • Lifted and boxed types
  • Strictness analysis
  • Sequential order
  1. Appendix
  • References
ghc
haskell

Contributors

takenobu-hs

43 commits

takenobu-hs/lazy_evaluation

haskell lazy evaluation illustrated

72

43 commits

updated May 3, 2017

See the code

README

Lazy evaluation illustrated

for Haskell divers

This is an illustrated document about lazy evaluation in Haskell

Here is: Lazy evaluation illustrated for Haskell divers (PDF).

Contents

  1. Introduction
  • Basic mental models
  • Lazy evaluation
  • Simple questions
  1. Expressions
  • Expression and value
  • Expressions in Haskell
  • Classification by values and forms
  • WHNF
  1. Internal representation of expressions
  • Constructor
  • Thunk
  • Uniform representation
  • WHNF
  • let, case expression
  1. Evaluation
  • Evaluation strategies
  • Evaluation in Haskell (GHC)
  • Examples of evaluation steps
  • Examples of evaluations
  • Controlling the evaluation
  1. Implementation of evaluator
  • Lazy graph reduction
  • STG-machine
  1. Semantics
  • Bottom
  • Strict/Non-strict
  • Lifted and boxed types
  • Strictness analysis
  • Sequential order
  1. Appendix
  • References
ghc
haskell

Contributors

takenobu-hs

43 commits