
Bryan O'Sullivan wrote:
Why not make the task specificity clearer, with a separate Control.Applicative.Parsing module?
Iavor Diatchki wrote:
What would be the benefit of having a separate module?
Well, putting those combinators in Control.Applicative would suggest that applicative functors are for parsing only :)
By the way, the combinators are all variations of 'many': 'skipMany' is just like 'many' but ignoring the results; 'endBy' performs a "cleanup" computation after each iteration; "sepBy" performs a "cleanup" operation between iterations. As I said before, these are just ordinary control structures.
What I want to say is that I doubt that many and friends are general purpose. Is there an example of an applicative functor that is not a parser but for which many , skipMany and so on make sense / are useful? For [] and Maybe, both many [1] many $ Just 1 just give a stack overflow. Regards, apfelmus