[Haskell-cafe] lost in generics
José Pedro Magalhães
jpm at cs.uu.nl
Thu Oct 20 19:26:42 CEST 2011
GHC has built-in support for two generic programming libraries. SYB 
support has been there for a long time. The new generic mechanism , which
allows you to define your own, (almost) derivable classes, only appeared in
7.2, but is planned to stay.
What library you should use depends on what you want to do. There's a
(slightly outdated) paper about that . If you're looking into AST
manipulations, SYB (or Uniplate ) might be the best pick. For most things
I prefer the new generic mechanism, though.
On Thu, Oct 20, 2011 at 18:12, Rustom Mody <rustompmody at gmail.com> wrote:
> I need some help finding my way around the various generics libraries.
> My usage scenario is -- at least to start with -- the ASTs of programming
> It appears to me that there are two generations of generics -- earlier
> there was generic haskell and strafunski
> Now there is uniplate and kure (and syb? -- not sure of its generation...)
> I get this impression because I saw a comment somewhat along these lines.
> And also the very first reference link on the strafunski webpage:
> viz http://www.cs.vu.nl/Strafunski/
> seems to be dead. So I am wondering whether strafunski is still under
> development or is it defunct?
> The following paras from
> The current status of generic programming in Haskell is comparable
>> to the lazy Tower of Babel preceding the birth of Haskell
>> in the eighties [Hudak et al., 2007]. We have many single-site languages
>> or libraries, each individually lacking critical mass in terms
>> of language/library-design effort, implementations, and users.
> Although generic programming has been used in several applications,
>> it has few users for real-life projects. This is understandable.
>> Developing a large application takes a couple of years, and
>> choosing a particular approach to generic programming for such a
>> project involves a risk. Few approaches that have been developed
>> over the last decade are still supported, and there is a high risk that
>> the chosen approach will not be supported anymore, or that it will
>> change in a backwards-incompatible way in a couple of years time.
> sound omninous :-)
> In general my question is: What is alive/active and what is alive/active
> and what is -- um -- moved-on-from.
> And of course which are easier and which more difficult to dig into.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe