Re: [Haskell-cafe] Are all arrows functors?

2009-11-05 Thread Andrew Coppin
Nicolas Pouillard wrote: Excerpts from Neil Brown's message of Tue Nov 03 13:45:42 +0100 2009: Hi, I was thinking about some of my code today, and I realised that where I have an arrow in my code, A b c, the type (A b) is also a functor. The definition is (see

Re: [Haskell-cafe] Are all arrows functors?

2009-11-05 Thread David Menendez
On Thu, Nov 5, 2009 at 4:34 PM, Andrew Coppin andrewcop...@btinternet.com wrote: Nicolas Pouillard wrote: Excerpts from Neil Brown's message of Tue Nov 03 13:45:42 +0100 2009: Hi, I was thinking about some of my code today, and I realised that where I have an arrow in my code, A b c, the

[Haskell-cafe] Are all arrows functors?

2009-11-03 Thread Neil Brown
Hi, I was thinking about some of my code today, and I realised that where I have an arrow in my code, A b c, the type (A b) is also a functor. The definition is (see http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Arrow.html): fmap = (^) -- Or, in long form: fmap f x =

Re: [Haskell-cafe] Are all arrows functors?

2009-11-03 Thread Eugene Kirpichov
2009/11/3 Neil Brown nc...@kent.ac.uk: Hi, I was thinking about some of my code today, and I realised that where I have an arrow in my code, A b c, the type (A b) is also a functor.  The definition is (see http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Arrow.html): fmap

Re: [Haskell-cafe] Are all arrows functors?

2009-11-03 Thread Nicolas Pouillard
Excerpts from Neil Brown's message of Tue Nov 03 13:45:42 +0100 2009: Hi, I was thinking about some of my code today, and I realised that where I have an arrow in my code, A b c, the type (A b) is also a functor. The definition is (see

Re: [Haskell-cafe] Are all arrows functors?

2009-11-03 Thread George Pollard
See also the paper Idioms are oblivious, arrows are meticulous, monads are promiscuous [1]. Functors can be extended to give applicative functors (idioms) which can then be extended to arrows, and then monads. So all arrows are also (applicative) functors. [1]: