
On Wed, Dec 14, 2011 at 10:29 PM, Chris Wong < chrisyco+haskell-cafe@gmail.com> wrote:
-- [Warning]: This is only defined for actions that eventually fail -- after being performed repeatedly, such as parsing. For pure values such -- as 'Maybe', this will cause an infinite loop.
This is both confusing and incorrect. It's entirely possible for an action in the Maybe type to fail. For the Maybe type, "failing" means an action returns Nothing, and "succeeding" means an action returns Just (some value). If an action of type Maybe a is written to always and unconditionally return Just some-value-or-other, *that's* when some or many will infinite-loop if used with it. That doesn't mean there's something wrong with the definitions of some or many, but rather that they need to be supplied with an action that will at some point fail.