Difference between revisions of "Arrow"
EndreyMark (talk | contribs) m (Better characterization of the ``Lazy K'' pure lazy functional programming language) |
EndreyMark (talk | contribs) (→Parser: Using term ``differential'' to express a subjective impression on arrow parsers) |
||
Line 30: | Line 30: | ||
An implementation: [http://www.cs.helsinki.fi/u/ekarttun/PArrows/ PArrows] written by [http://www.haskell.org/tmrwiki/EinarKarttunen Einar Karttunen]. |
An implementation: [http://www.cs.helsinki.fi/u/ekarttun/PArrows/ PArrows] written by [http://www.haskell.org/tmrwiki/EinarKarttunen Einar Karttunen]. |
||
+ | |||
+ | The funny thing which took a long time for me to understand arrow parsers is a sort of differential approach -- in contrast to the [http://www.willamette.edu/~fruehr/haskell/seuss.html well-known parser approaches]. I mean, in some way well-known parsers are of differential approach, too -- but arrow parsers are differential also in terms of the parsed values too, not only in terms of the consumed stream. |
||
=== Stream processor === |
=== Stream processor === |
Revision as of 22:10, 11 June 2006
import Control.Arrow |
Introduction
Arrows: A General Interface to Computation written by Ross Peterson.
HaWiki's UnderstandingArrows.
Monad.Reader's ArrowsIntroduction article.
See also Research papers/Monads and arrows.
Library
Control.Arrow is the standard ibrary for arrows.
Arrow transformer library (see the bottom of the page) is an extension with arrow transformers, subclasses, useful data types (Data.Stream, Data.Sequence).
Examples
Various concepts follow here, which can be seen as concrete examples covered by the arrow concept. Not all of them provide links to Haskell-related materials: some of them are here only to give a self-contaned material (e.g. section #Automaton gives links only to the finite state concept itself.).
Parser
The reasons why the arrow concept can solve important questions when designing a parser library are explained in Generalising Monads to Arrows written by John Hughes.
A good example of the mentioned arrow parsers can be seen in A New Notation for Arrows written by Ross Peterson: figure 2, 4, 6 (page 3, 5, 6).
An implementation: PArrows written by Einar Karttunen.
The funny thing which took a long time for me to understand arrow parsers is a sort of differential approach -- in contrast to the well-known parser approaches. I mean, in some way well-known parsers are of differential approach, too -- but arrow parsers are differential also in terms of the parsed values too, not only in terms of the consumed stream.
Stream processor
The Lazy K programming language is an interesing esoteric language (from the family of pure, lazy functional languages), whose I/O concept is approached by streams.
Functional I/O, graphical user interfaces
On the Expressiveness of Purely Functional I/O Systems written by Paul Hudak and Raman S. Sundaresh.
Fudgets written by Thomas Hallgren and Magnus Carlsson. See also Arrows for Fudgets written by Magnus Carlsson, mentioning how these two concepts relate to each other.
Dataflow languages
Arrows and Computation written by Ross Paterson mentions how to mimick dataflow programming in (lazy) functional languages. See more on Lucid's own HaskellWiki page: Lucid.
Automaton
To see what the concept itself means, see the Wikipedia articles Finite state machine and also Automata theory.
How these concepts can be implemented using the concept of arrow, can be found in the introductory articles on arrows mentioned above.