[Haskell-cafe] lost in generics

Neil Mitchell ndmitchell at gmail.com
Mon Oct 24 20:50:21 CEST 2011

Hi Rustom,

I tend to find that I use Uniplate for most stuff, and SYB for very
complex stuff (SYB is quite a bit more complicated to do the simple
things, but can do things out of reach for Uniplate). The example of
manipulating AST's is very common, and using a generics library is a
very good idea.

One way to start would be to read the Uniplate manual:
http://community.haskell.org/~ndm/darcs/uniplate/uniplate.htm - it
even uses a simple expression type as the example. It has examples of
all the functions, and also little exercises to try - even if you
don't use Uniplate the exercises might give you practice figuring out
what functions you're likely to end up using in your generics library.

Thanks, Neil

On Thu, Oct 20, 2011 at 6:12 PM, 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
> languages.
> 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:
> http://www.haskell.org/haskellwiki/Applications_and_libraries/Generic_programming/Strafunski
> 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
> http://www.cs.uu.nl/research/techreps/repo/CS-2008/2008-010.pdf
>> 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.
> Thanks
> Rusi
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list