On Mon, Dec 12, 2011 at 9:23 AM, Carl Howells <chowell...@gmail.com> wrote:

> > There is absolutely no implication of consuming anything in the
> definitions
> > of many or some. This is how they happen to behave when used in the
> context
> > of some parsing libraries, but that's all. If many or some always go
> into an
> > infinite loop for some Alternative instance, then I suspect that the
> > instance itself is either broken or shouldn't exist.
>
> So, then...  The instance for Maybe shouldn't exist?
>

Don't be silly. The purpose of some and many is to be used with combinators
that are expected to fail sometimes. If you use them with combinators that
always succeed, of course you're going to get an infinite loop. Would you
propose to ban recursive functions because they might not terminate?

Apparently the confusion here lies with the fact that the documentation for
some and many are too terse for their behaviour to be easily understood.
That's a whole different category of problem than "ban them!".
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to