Published in Volume XII, 2002, pages 1-27

Authors: Stefan ANDREI, Wei-Ngan CHIN, Gheorghe GRIGORAS


This paper presents a monadic approach for treating arithmetic expressions evaluation in programming languages. The evaluation of arithmetic expressions is an important task in any compiler design. Using monads, our paper provides an implementation in Haskell and illustrates optimization opportunities based on standard monadic combinators. Correctness results are also taken into account.


  title={A Tutorial on a Monadic Approach for Expressions Evaluation.},
  author={Stefan ANDREI and Wei-Ngan CHIN and Gheorghe GRIGORAS},
  journal={Scientific Annals of Computer Science},
  organization={``A.I. Cuza'' University, Iasi, Romania},
  publisher={``A.I. Cuza'' University Press}