[Haskell-cafe] Control.Alternative --- some and many?

2010-06-22 Thread Gregory Crosswhite
Hey everyone, Could someone explain to me (or point me to a reference explaining) the purpose of the "some" and "many" methods of the Alternative class? Also, there is a link posted in the documentation for Control.Applicative to a paper which describes the motivation behind the Applicative

Re: [Haskell-cafe] Control.Alternative --- some and many?

2010-06-22 Thread Christopher Done
I'm not sure how Alternative differs from MonadPlus, other than being defined for Applicative rather than Monad. They have the same laws (identity and associativity). "Some" and "many" are probably motivated by their usefulness in parsers. Hence "optional", etc. I'm sure there are plenty of oth

Re: [Haskell-cafe] Control.Alternative --- some and many?

2010-06-23 Thread Neil Brown
On 23/06/10 06:54, Christopher Done wrote: I'm not sure how Alternative differs from MonadPlus, other than being defined for Applicative rather than Monad. They have the same laws (identity and associativity). Importantly, MonadPlus must satisfy some laws for (>>=) and (>>), whereas Alter