Hi Andrew,
Andrew Coppin wrote:
> Uh... what's Applicative? (I had a look at Control.Applicative, but
> it just tells me that it's "a strong lax monoidal functor". Which
> isn't very helpful, obviously.)
Seriously, what are you talking about? The haddock page for
Control.Applicative hoogle links to begins with
> This module describes a structure intermediate between a functor and
> a monad: it provides pure expressions and sequencing, but no binding.
> (Technically, a strong lax monoidal functor.) For more details, see
> Applicative Programming with Effects, by Conor McBride and Ross
> Paterson, online at
>http://www.soi.city.ac.uk/~ross/papers/Applicative.html.>> This interface was introduced for parsers by Niklas Röjemo, because
> it admits more sharing than the monadic interface. The names here are
> mostly based on recent parsing work by Doaitse Swierstra.
>> This class is also useful with instances of the Traversable class.
I agree that this is hard to understand, but it's more then just "strong
lax monoidal functor", isn't it? More importantly, there is a reference
to a wonderful and easy to read paper. (easy in the "easy for Haskell
programmers" sense, not in the "easy for the authors, and maybe the
inventors of Haskell" sense). Just give it a try.
Just in case you missed the link for some reason, here is it again:
http://www.soi.city.ac.uk/~ross/papers/Applicative.html
Tillmann
PS. Regarding Applicative, you may be interested in the original
proposal introducing it, which can be found here:
http://www.soi.city.ac.uk/~ross/papers/Applicative.html
PPS. Don't miss McBride's and Peterson's great paper about applicative
functors at http://www.soi.city.ac.uk/~ross/papers/Applicative.html.
PPPS. You may also be interested in
http://www.soi.city.ac.uk/~ross/papers/Applicative.pdf.
PPPPS. If you wonder what do to next when visiting
http://www.soi.city.ac.uk/~ross/papers/Applicative.html, you could
consider clicking on the link to
http://www.soi.city.ac.uk/~ross/papers/Applicative.pdf. Its a very
interesting paper, well, actually, it reads more like a tutorial. Just
like a blog post, but so much better then the usual blog post.