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. <http://donsbot.wordpress.com/2010/03/01/evolving-faster-haskell-programs-now-with-llvm/>
http://donsbot.wordpress.com/2010/03/01/evolving-faster-haskell-programs-now-with-<http://donsbot.wordpress.com/2010/03/01/evolving-faster-haskell-programs-now-with-llvm/> 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 <[email protected]> > 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 " <[email protected]> > > > > 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 <[email protected]> > > > > 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. >
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
