[Haskell-cafe] Re: is there any reason why Language.C.Syntax.AST.CTranslUnit doesn't derive show?

José Pedro Magalhães jpm at cs.uu.nl
Sat Mar 28 03:41:10 EDT 2009


Hello Anatoly,

Bear in mind that gshow behaves a bit differently from the regular show
(namely regarding parenthesis and efficiency). You can also use standalone
deriving [1] to derive Show for those datatypes.


Cheers,
Pedro

[1]
http://www.haskell.org/ghc/docs/latest/html/users_guide/deriving.html#stand-alone-deriving

On Sat, Mar 28, 2009 at 02:07, Anatoly Yakovenko <aeyakovenko at gmail.com>wrote:

> ah, i am guessing its because you can use Data.Generics.gshow to do
> the same thing.  Seems like that library will come in handy when
> manipulating the AST, pretty cool stuff.
>
> On Fri, Mar 27, 2009 at 5:53 PM, Anatoly Yakovenko
> <aeyakovenko at gmail.com> wrote:
> > is there any reason why Language.C.Syntax.AST.CTranslUnit doesn't
> > derive show?  I would like to look at the data structure it generates.
> >  It's a lot easier to experiment it when i can write a template C
> > file, print out the AST and then modify that data structure directly,
> > instead of trying to grok the library.
> >
> > Thanks for your great work btw, the parser is pretty sweet.
> > Anatoly
> >
> _______________________________________________
> 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/20090328/9ea3eb91/attachment.htm


More information about the Haskell-Cafe mailing list