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 <[email protected]> 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 <[email protected]> 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
> [email protected]
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to