[Haskell-cafe] Attoparsec concatenating combinator

Mario Blažević mblazevic at stilo.com
Fri Jun 3 15:50:51 CEST 2011

On 11-06-03 06:00 AM, Yitzchak Gale wrote:
> Mario Blažević wrote:
>>   I don't know if this helps, but the incremental-parser library has
>> exactly the combinator you're looking for.
> Wow, that is a beautiful implementation of a general parser
> library. So much simpler than Parsec. Thanks for pointing it out.

	Thanks. I guess I should get to work fixing its deficiencies then.

> Why are you hiding those nice Monoid classes in the parser
> package? Shouldn't it be a separate package?

	I considered it, and I'll do it if there's interest, but for the first 
release I decided to keep them close to where they're needed. There was 
less work that way. I'd hate to release a standalone package with only 
half the instance implementations.

> Edward Kmett has also been adding some nice Monoid
> abstractions lately. I haven't been following all of it. I wonder
> how yours and his relate.

	If you mean semigroups, they are related but only through Monoid. 
Semigroup is a superclass of Monoid, whereas CancellativeMonoid and 
FunctorialMonoid are its subclasses. CancellativeMonoid is lying between 
a Monoid and Group in power. It would make more sense to merge my 
classes into some group package, though I don't see any obvious 
candidate on Hackage right now.

More information about the Haskell-Cafe mailing list