[Haskell-cafe] Implicit parameters and Arrows/Yampa?
Peter Verswyvelen
bf3 at telenet.be
Sun Jan 6 17:44:51 EST 2008
If I understand it correctly, implicit parameters in Haskell allow you to
pass values to functions with explicitly adding a parameter to each of the
functions being "called" (I appologize for my imperative terminology here.
How would I say this correctly? Being "evaluated"?)
The arrows always use tuples to group the input and output parameters, like:
foo :: SF (Int,Int,Int) (Int,Int)
foo = proc (x,y,z) -> do
p <- cat -< (x,y)
q <- dog -< z
returnA -< (p,q)
where
cat = proc (x,y) -> returnA -< (x+y)
dog = proc z -> returnA -< 10*z
Suppose I don't want to explicitly pass the x and y parameters to the cat
(and deeper) arrows, but make them implicit. I guess that would be
impossible? I mean, I can't use implicit parameters language extension to
make the arrow input parameters implicit?
Thanks,
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080106/561e9abd/attachment.htm
More information about the Haskell-Cafe
mailing list