[Haskell-cafe] Implicit parameters and Arrows/Yampa?
Derek Elkins
derek.a.elkins at gmail.com
Mon Jan 7 12:57:53 EST 2008
On Mon, 2008-01-07 at 17:24 +0100, Peter Verswyvelen wrote:
> Derek Elkins wrote:
> > Implicit parameters add an extra argument to a function conceptually.
> > What you need is to "add an argument" to "SF" which implicit parameters
> > don't know how to do since SF is just some data structure. One way to
> > deal with this is the way you deal with the same problem in Haskell
> > without implicit parameters. (I never use implicit parameters). In that
> > case you would use the Reader monad (transformer). Similarly, you can
> > use an equivalent Reader/Environment arrow transformer.
> >
> Nice, I did not know that monad yet, thanks!
>
> But can it be combined together with the arrows do/proc syntax? How
> would that look like?
Claude Heiland-Allen gave an example, I just want to clarify.
The only reason I referred to monads is for analogy. You don't use the
Reader monad or Reader monad transformer, you use an idea analogous to a
monad transformer called an arrow transformer, which is what Claude
does.
More information about the Haskell-Cafe
mailing list