Combinator library
From Wikipedia, the free encyclopedia
A combinator library is a software library which implements a parser for combinators for a functional programming language; "the key idea is this: a combinator library offers functions (the combinators) that combine functions together to make bigger functions"[1]. These kinds of libaries are particularly useful for allowing domain-specific programming languages to be easily embedded into a general purpose language by defining a few primitive functions for the given domain and turning over the task of expanding higher-level constructs to the general language. An example would be the monadic Parsec parser [1] for Haskell. The library approach allows the parsers to be first-class citizens of the language.
[edit] See also
[edit] References
- ^ pg 35 of [http://research.microsoft.com/~simonpj/papers/history-of-haskell/index.htm "History of Haskell"
[edit] External links
- "Designing and Using Combinators: The Essence of Functional Programming"
- Daan Leijen and Erik Meijer (2001). "Parsec: Direct Style Monadic Parser Combinators for the Real World". UU-CS-2001-27.
- Daan Leijen and Erik Meijer (October 1999,). "Domain Specific Embedded Compilers", 109-122.
- Hughes, John (1995). in Jeuring, J. and Meijer, E.: "The Design of a Pretty-printing Library". Springer Verlag.