[Haskell] string type class

Edward Kmett ekmett at gmail.com
Fri Mar 6 11:28:40 EST 2009

I'd be more interested in a kitchen-sink "List" class. ByteString,
ByteString.Lazy, Text, [a], and the pending Text.Lazy all support the basic
operations of lists of a particular type. It'd be a fairly huge dictionary
by the current API design of those however. Its just a reiteration of the
classic "Collection" class example.

The biggest problem is that it requires either MPTCs/fundeps or type aliases
to make it work, which makes less progressive folks queasy about its
inclusion as a standard library.

On the other hand, if you're going that far, it'd be nice to factor out a
superclass or two for things like lookup/insert functionality, so you can
eliminate a major reason why Data.Map has to be imported qualified as well.

-Edward Kmett
On Fri, Mar 6, 2009 at 11:16 AM, minh thu <noteed at gmail.com> wrote:

> 2009/3/6 Wolfgang Jeltsch <g9ks157k at acme.softbase.org>:
> > Am Freitag, 6. März 2009 13:33 schrieb Matthew Pocock:
> >> Hi,
> >>
> >> It seems every time I look at hackage there is yet another stringy
> >> datatype. For lots of apps, the particular stringy datatype you use
> matters
> >> for performance but not algorithmic reasons. Perhaps this is a good time
> >> for someone to propose a stringy class?
> >>
> >> Matthew
> >
> > There is already the class IsString which was introduced for overloaded
> string
> > literals.
> >
> > However, the name is terrible. No other Haskell class I know of has an
> “Is” at
> > its beginning. Classes don’t name properties (IsNum, IsMonoid, Has…).
> LLVM bindings use it a lot...
> Cheers,
> Thu
>  _______________________________________________
> Haskell mailing list
> Haskell at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell/attachments/20090306/44e26ed7/attachment.htm

More information about the Haskell mailing list