[Haskell] string type class
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.
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
> >> 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
> > 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...
> Haskell mailing list
> Haskell at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell