[Haskell-cafe] Please add instance Semigroup Text

Edward Kmett ekmett at gmail.com
Tue May 3 18:17:28 CEST 2011


On Tue, May 3, 2011 at 12:04 PM, Bryan O'Sullivan <bos at serpentine.com>wrote:

> On Tue, May 3, 2011 at 8:00 AM, Yitzchak Gale <gale at sefer.org> wrote:
>
>>
>> Could you please add a Semigroup instance for Text?
>>
>
>
I'd strongly recommend writing an instance for the text package's Builder
> type instead. Vastly more efficient for non-trivial jobs.
>

Unfortunately, I don't think I can really bring myself to do either.

I was deliberately trying to keep the number of dependencies for the
semigroups as low as possible in contrast to my previous efforts. In
fact, I'll likely invert the dependencies from tagged and void, leaving only
the dependency on containers, which is somewhat unavoidable, but still
Haskell 98.

My goal was to build a very small standardizable library.

Data.Text requires dependencies that would take my package and a whole
hierarchy of other Haskell 98 packages that are built on top of it, out of
Haskell 98.

-Edward


>
>
>> Once you're doing that, I suppose you'd also want to
>> add it for lazy Text and both kinds of ByteStrings.
>>
>
> Likewise, there's allegedly work afoot to write a builder for bytestrings.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110503/10496f8c/attachment.htm>


More information about the Haskell-Cafe mailing list