Language.C deriving (Show)
Benedikt Huber
benedikt.huber at gmail.com
Sun Feb 15 06:19:51 EST 2009
On 13.02.2009, at 19:58, John Van Enk wrote:
> Benedikt,
>
> Have you considered adding a derived show clause to Language.C? I
> keep finding that I'd like to dump the internal representation of
> the Language.C AST.
Hi John,
I'm not sure if deriving Show is adequate for debugging purposes.
I didn't yet finish it (soon I hope), but I use examples/sourceview
for debugging the AST (in darcs).
Eventually, I'd like to add the generic tree export sketched in the
example to the library.
Any suggestions and criticism are welcome.
> One other thing, is there a plan in the future to convert your data
> structure to using the record syntax?
This is certainly something to think about, though I'd say e.g.
expressions don't benefit as much from record syntax as
declarations do. Do you suggest to use records for all AST types, or
just some of them (as ghc does) ?
benedikt
More information about the Language-c
mailing list