[Haskell-cafe] Which generic zipper? [RESOLVED]

José Pedro Magalhães jpm at cs.uu.nl
Thu Apr 11 08:53:37 CEST 2013


Hi Luke,

Even though you might have made up your mind already, here's some more
info. If you want a
zipper that does not use Typeable (and thus runtime type comparison and
casting, which are
potentially inefficient), you can use the zipper in Multirec [1].

Creating a zipper based on GHC.Generics should be easy taking the zipper
based on
instant-generics [2], or you can just use Sean Leather's rendering [3].


Cheers,
Pedro

[1] http://hackage.haskell.org/package/multirec
[2] http://hackage.haskell.org/package/instant-zipper
[3] https://github.com/spl/generic-deriving-extras

On Thu, Apr 11, 2013 at 8:44 AM, Luke Evans <luke at eversosoft.com> wrote:

> Thanks Roman.
>
> I'll probably go with Data.Data then.  Certainly, I'm not looking for any
> significant distractions and I'll heed your cautionary note.
> I read that GHC.Generics is fit and fast in comparison to SYB, but that's
> not really a big concern for me at the moment.
> I just fell in to believing that GHC.Generics was the true religion given
> its apparent status as the adopted generics in GHC.
>
> On 2013-04-10, at 11:24 PM, Roman Cheplyaka <roma at ro-che.info> wrote:
>
> > Note that syz is essentially based on Data.Data, which is no less
> > "official" than GHC.Generics. (The compiler can derive Data with
> > -XDeriveDataTypeable.)
> >
> > You can write a zipper based on GHC.Generics, but it won't be a
> > straightforward translation of syz (nor would it be a trivial
> > undertaking).
> >
> > Roman
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130411/c016a5e5/attachment.htm>


More information about the Haskell-Cafe mailing list