A recursive do for Haskell

  • Authors:
  • Levent Erkök;John Launchbury

  • Affiliations:
  • OGI School of Science and Engineering, OHSU;OGI School of Science and Engineering, OHSU

  • Venue:
  • Proceedings of the 2002 ACM SIGPLAN workshop on Haskell
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

Certain programs making use of monads need to perform recursion over the values of monadic actions. Although the do-notation of Haskell provides a convenient framework for monadic programming, it lacks the generality to support such recursive bindings. In this paper, we describe an enhanced translation schema for the donotation and its integration into Haskell. The new translation allows variables to be bound recursively, provided the underlying monad comes equipped with an appropriate fixed-point operator.