Re: [Haskell-cafe] lost in generics

2011-10-24 Thread Neil Mitchell
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

[Haskell-cafe] lost in generics

2011-10-20 Thread Rustom Mody
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

Re: [Haskell-cafe] lost in generics

2011-10-20 Thread José Pedro Magalhães
Hi Rusi, GHC has built-in support for two generic programming libraries. SYB [1] support has been there for a long time. The new generic mechanism [2], 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

Re: [Haskell-cafe] lost in generics

2011-10-20 Thread Stephen Tetley
On 20 October 2011 18:12, Rustom Mody rustompm...@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. In general my question is:  What is alive/active and what is

Re: [Haskell-cafe] lost in generics

2011-10-20 Thread Bas van Dijk
On 20 October 2011 19:12, Rustom Mody rustompm...@gmail.com wrote: And of course which are easier and which more difficult to dig into. If you're looking for an example for the new GHC generic mechanism: I recently added a generic default implementation to the ToJSON and FromJSON type classes of