[Haskell-cafe] Bytestrings and [Char]

Alberto G. Corona agocorona at gmail.com
Wed Mar 24 08:02:13 EDT 2010

Once we have a  tree of type classes suitable for all containers, as you
said, theoretically it  shouldn't very difficult to incorporate the testing
of different instances for each class used in a program, besides  testing
different compilation flags in a genetic algoritm. This latter has already
been done.


To find automatically the best combination of class implementations and
compilation flags in a single process would be very useful and would save a
lot of manual testing.

2010/3/24 John Lato <jwlato at gmail.com>

> Hi Alberto,
> To some extent this already exists, it's just that nobody uses it.  I
> believe it's the approach taken by the Edison libraries.  Also the
> ListLike package provides the type classes ListLike, StringLike, and a
> few others.  Neither seems to have become very popular despite having
> well-respected authors (Okasaki and Goerzon, respectively).
> Some container functions are already provided by other classes, namely
> Foldable, Traversable, and Monoid.
> The first bit, creating a tree of type classes suitable for all
> containers, is probably a few hours work.
> An automated system to determine the best implementation is
> significantly more difficult; I can't say if the scope would be
> appropriate for SoC.
> Best,
> John
> > From: "Alberto G. Corona " <agocorona at gmail.com>
> >
> > Just a dream:
> > -separate interface and implementation for all containers, via type
> classes
> > -develop, by genetic programming techniques + quickcheck, a system that
> find
> > the best container implementation for a particular program.
> >
> > Is that suitable for a Google Summer of Code project?
> >
> > 2010/3/23 Alberto G. Corona <agocorona at gmail.com>
> >
> > The question can be generalized via type classes: Is there any common set
> of
> >> primitives encapsulated into a single type class that has instances for
> >> Strings (Data.List) ByteStrings, Data.Text, Lazy bytestrings, Arrays,
> >> vectors and wathever container that can store an boxed, unboxed, packed
> >> unpacked sequence of wathever including chars? All of them have folds,
> >> heads, tails and a lot of common functions with the same name, but since
> >> there is not a single type class, the library programmer can not
> abstract
> >> his code when it is possible, so the library user can chose the
> particular
> >> instance for his particular problem.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100324/14509178/attachment.html

More information about the Haskell-Cafe mailing list