Generic Monadic Constructs for Embedded Languages

  • Anders Persson
  • Emil Axelsson
  • Josef Svenningsson
Conference paper

DOI: 10.1007/978-3-642-34407-7_6

Volume 7257 of the book series Lecture Notes in Computer Science (LNCS)
Cite this paper as:
Persson A., Axelsson E., Svenningsson J. (2012) Generic Monadic Constructs for Embedded Languages. In: Gill A., Hage J. (eds) Implementation and Application of Functional Languages. IFL 2011. Lecture Notes in Computer Science, vol 7257. Springer, Berlin, Heidelberg

Abstract

We present a library of generic monadic constructs for embedded languages. It is an extension of Syntactic, a Haskell library for defining and processing generic abstract syntax. Until now, Syntactic has been mostly suited to implement languages based on pure, side effect free, expressions. The presented extension allows the pure expressions to also contain controlled side effects, enabling the representation of expressions that rely on destructive updates for efficiency. We demonstrate the usefulness of the extension by giving examples from the embedded language Feldspar which is implemented using Syntactic.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Anders Persson
    • 1
    • 2
  • Emil Axelsson
    • 1
  • Josef Svenningsson
    • 1
  1. 1.Chalmers University of TechnologySweden
  2. 2.EricssonSweden