PROPOSAL: Some more 'Applicative' combinators

Iavor Diatchki iavor.diatchki at gmail.com
Tue Jan 8 18:11:05 EST 2008


Hello,

On Jan 8, 2008 1:43 AM, apfelmus <apfelmus at quantentunnel.de> wrote:
> Iavor Diatchki wrote:
> > Bryan O'Sullivan wrote:
> >> Why not make the task specificity clearer, with a separate
> >> Control.Applicative.Parsing module?
>
> +1
>
> > Now _this_ would definitely suggest that they are only good for
> > parsing which would be misleading.
>
> Would it? I mean, I currently don't know a second use case for them.
> Preferably, the names like  skipMany , endBy , sepBy etc. should still
> make sense in the new context.

Yes it would.  The name Control.Applicative.Parsing certainly suggests
that.    We should not overdo the granularity of the modules in the
library.  What would be the benefit of having a separate module?

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.

-Iavor


More information about the Libraries mailing list