2018Unpublished venueOpen access

A recursive do for Haskell : design and implementation

Levent Erkök

Open full text 5 citations

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. To remedy this problem, we propose an extension to Haskell's do-notation and describe its translation into the core language. Computing Review Subject Categories: Formal denitions and theory (D.3.1), Language constructs and features (D.3.3). Keywords: Haskell, monads, recursion, mx, do-notation. 1 Introduction Suppose you are designing an interpreter for a language that has ### expressions for introducing local bindings. Operationally, the expression #########denotes the same value as # where # is substituted for all free occurrences of the variable #. The abstract syntax of your language might include: data Exp = ... | Let Var Exp Exp Assuming the language is applicative, the natural choice for implementation would be the envir...

About this research paper

What this paper is about

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. To remedy this problem, we propose an extension to Haskell's do-notation and describe its translation into the core language. Computing Review Subject Categories: Formal denitions and theory (D.3.1), Language constructs and features (D.3.3). Keywords: Haskell, monads, recursion, mx, do-notation. 1 Introduction Suppose you are designing an interpreter for a language that has ### expressions for introducing local bindings. Operationally, the expression #########denotes the same value as # where # is substituted for all free occurrences of the variable #. The abstract syntax of your language might include: data Exp = ... | Let Var Exp Exp Assuming the language is applicative, the natural choice for implementation would be the envir...

Why it matters

OpenAlex reports 5 citations for this work. Citation counts describe recorded attention and do not establish research quality.

Key contribution

A contribution statement is not available in the OpenAlex record.

Method / approach

Method details are not available in the OpenAlex metadata.

Main findings

Findings are not separately available in the OpenAlex metadata.

Limitations

Limitations are not available in the OpenAlex metadata.

Applications

Application details are not available in the OpenAlex metadata.

Available 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. To remedy this problem, we propose an extension to Haskell's do-notation and describe its translation into the core language. Computing Review Subject Categories: Formal denitions and theory (D.3.1), Language constructs and features (D.3.3). Keywords: Haskell, monads, recursion, mx, do-notation. 1 Introduction Suppose you are designing an interpreter for a language that has ### expressions for introducing local bindings. Operationally, the expression #########denotes the same value as # where # is substituted for all free occurrences of the variable #. The abstract syntax of your language might include: data Exp = ... | Let Var Exp Exp Assuming the language is applicative, the natural choice for implementation would be the envir...

Key concepts: Haskell, Programming language, Computer science, Recursion (computer science), Notation, Generality, Extension (predicate logic), Functional programming

Related papers

Back to paper searchBrowse research topicsOriginal source
A recursive do for Haskell : design and implementation — Research Paper | ScholarLens