Re: [Haskell-cafe] Applicative is like an Arrow

2013-08-18 Thread damodar kulkarni
Thanks again for the detailed and explanatory answer. That's the reason I'm writing these huge responses, because I hope I can shorten this journey for others. This has certainly helped me grasp some aspects in this regard. While Monad Transformers are awesome and can solve many problems

Re: [Haskell-cafe] Applicative is like an Arrow

2013-08-17 Thread Mathijs Kwik
damodar kulkarni kdamodar2...@gmail.com writes: Thanks for this nice analogy and explanation. This brings monad transformers to my mind. without monad transformers, the monads are bit crippled in their applicability (please correct me if I am wrong) and with monad transformers the code

Re: [Haskell-cafe] Applicative is like an Arrow

2013-08-17 Thread David Menendez
On Sat, Aug 17, 2013 at 8:23 AM, Mathijs Kwik math...@bluescreen303.nlwrote: damodar kulkarni kdamodar2...@gmail.com writes: Thanks for this nice analogy and explanation. This brings monad transformers to my mind. without monad transformers, the monads are bit crippled in their

Re: [Haskell-cafe] Applicative is like an Arrow

2013-08-16 Thread satvik chauhan
Whenever I am confused I refer to this article http://www.haskell.org/haskellwiki/Typeclassopedia#Arrow -Satvik On Fri, Aug 16, 2013 at 7:34 PM, Thiago Negri evoh...@gmail.com wrote: I just stumbled upon the Applicative term. Arrows are quite difficult for me to understand at the moment. I

Re: [Haskell-cafe] Applicative is like an Arrow

2013-08-16 Thread Brandon Allbery
On Fri, Aug 16, 2013 at 10:04 AM, Thiago Negri evoh...@gmail.com wrote: I just stumbled upon the Applicative term. Arrows are quite difficult for me to understand at the moment. I guess it needs time to digest. But, as I understand so far, Applicative and Arrows looks like the same thing.

Re: [Haskell-cafe] Applicative is like an Arrow

2013-08-16 Thread Tom Ellis
On Fri, Aug 16, 2013 at 10:26:42AM -0400, Brandon Allbery wrote: My understanding is that there's a rework of Arrow in progress that may change this in the future, since *theoretical* Arrows are more distinct, flexible and useful than the current implementation. I'd like to know more about

Re: [Haskell-cafe] Applicative is like an Arrow

2013-08-16 Thread Brandon Allbery
On Fri, Aug 16, 2013 at 10:49 AM, Tom Ellis tom-lists-haskell-cafe-2...@jaguarpaw.co.uk wrote: On Fri, Aug 16, 2013 at 10:26:42AM -0400, Brandon Allbery wrote: My understanding is that there's a rework of Arrow in progress that may change this in the future, since *theoretical* Arrows are

Re: [Haskell-cafe] Applicative is like an Arrow

2013-08-16 Thread Dan Burton
You may be interested in this paper: Idioms are oblivious, arrows are meticulous, monads are promiscuous http://homepages.inf.ed.ac.uk/wadler/papers/arrows-and-idioms/arrows-and-idioms.pdf Idioms refers to the Applicative class. To put it briefly, if you have an instance of Arrow, you also have

Re: [Haskell-cafe] Applicative is like an Arrow

2013-08-16 Thread Mathijs Kwik
Thiago Negri evoh...@gmail.com writes: I just stumbled upon the Applicative term. Arrows are quite difficult for me to understand at the moment. I guess it needs time to digest. But, as I understand so far, Applicative and Arrows looks like the same thing. Please, enlight me. I would

Re: [Haskell-cafe] Applicative is like an Arrow

2013-08-16 Thread Thiago Negri
You just made my day. I was trying to understand these things so hard and couldn't get it. Your analogies were brilliant. I'll read all links/papers posted here to get a deeper understanding of these things. I'll just skip dependently typed stuff for now, heh. Thank you, Thiago. 2013/8/16

Re: [Haskell-cafe] Applicative is like an Arrow

2013-08-16 Thread Albert Y. C. Lai
On 13-08-16 03:29 PM, Dan Burton wrote: Idioms are oblivious, arrows are meticulous, monads are promiscuous http://homepages.inf.ed.ac.uk/wadler/papers/arrows-and-idioms/arrows-and-idioms.pdf I much recommend this paper. Underrated, underknown, pinpointing, unifying.

Re: [Haskell-cafe] Applicative is like an Arrow

2013-08-16 Thread Dan Burton
Reading that blog post Mathijs linked, I had a big ah-hah moment when I read this: This is why arrow-notation creates two scopes. Between the - - symbols, only values that were in scope before execution of the Arrow are in scope. Outside the - -, values that appear during the execution of the

Re: [Haskell-cafe] Applicative is like an Arrow

2013-08-16 Thread damodar kulkarni
Thanks for this nice analogy and explanation. This brings monad transformers to my mind. without monad transformers, the monads are bit crippled in their applicability (please correct me if I am wrong) and with monad transformers the code becomes to some extent ugly (again, please correct me if I