Welcome to the Interpreter Zoo! A review of different interpreter/DSL schemes in Haskell. Examples of different Monad schemes will discussed, their advantages, disadvantages, and primary uses.
Outline:
- Explcit parameter passing
- State monad evaluation
- Reader monad evalution
- monad transformer library
- Free Monad
- Extensible effects
Evaluation Syntax: S-expression delimitted by parenthesis
Evaluation Semnatics: Scheme w/ (let, lambda, apply) on (primitive int,
primitive bool, primitive list comprehension)
Variable Scope Environment: Map of Text -> LispVal
Objective: A comparison of performance between Free Monad and mtl transformers
Free f a = { unFree :: f (Free f a) }
http://www.atamo.com/articles/free-monads-wont-detox-your-colon/
https://github.com/feuerbach/freemonad-benchmark
https://ro-che.info/articles/2014-06-14-extensible-effects-failed
http://softwareengineering.stackexchange.com/questions/242795/what-is-the-free-monad-interpreter-pattern
note there will need to be an additional 'Applicative' Instance declared for
(Free f).
https://github.com/purescript/purescript/blob/master/src/Language/PureScript/CodeGen/JS.hs