• Title/Summary/Keyword: Monad Transformer

Search Result 1, Processing Time 0.016 seconds

Development of an Assembly Language Interpreter Using Monad (모나드를 이용한 어셈블리 언어 인터프리터 개발)

  • Byun, Sug-Woo
    • Journal of KIISE:Software and Applications
    • /
    • v.37 no.5
    • /
    • pp.403-410
    • /
    • 2010
  • Monad in Haskell allows one to do imperative-style programming as well as pure functional programming. In this work, we characterize monadic abstraction and its programming technique by restructuring an assembly language interpreter coded in pure functional style into the one by the monadic style. Monad programming consists of two phases; the State monad is applied to a stack and a symbol table, and then a State Monad Transformer integrating these two monads is constructed. As a result, we can see that the program code by monad programming is much clearer and more intuitive than one written in the pure functional style.