language.c: support for statements in MonadTrav
bernauer at inf.ethz.ch
Tue Feb 8 09:08:29 GMT 2011
On Sat, Feb 05, 2011 at 02:54:21PM -0800, Aaron Tomb wrote:
> I considered the possibility of adding code to dive into statements,
> but I generally prefer the idea of using generic programming libraries
> for that sort of thing.
In the meanwhile I must say that I do agree.
I had to go through the "write your boilerplate code manually"-hell
first in order to understand ;-)
> For traversal of statements and expressions, I've had success doing
> generic programming with Uniplate, which is sufficient for everything
> I've needed, and purely static. As a result, it's almost as efficient
> as a hand-written traversal, and will never fail at runtime.
Hmm, sound's interesting.
The project home page  seems to be down, though.
The PlateDirect documentation  recommends using Uniplate.Direct. And
Uniplate is marked as deprecated  and refers to UniplateStr which
in turn recommends  Uniplate.Operations which you should not use
directly  but import Uniplate.Direct instead. Is this me or is this
What is the reason why you have chosen PlateDirect?
And is it maybe possible to generate the Plate instances with DrIFT ?
Nevertheless, I am looking forward to your release. It will relieve me
from manually traversing the ASTs.
> I haven't completely tied in the code to build a full
> symbol table yet, but I don't think there's much work left to be done.
So, do you plan to include this into the upcoming release?
> The existing code will build up a map containing information about all
> global declarations, but my idea is to extend that to include local
> declarations, as well, to make it useful when doing repeated traversal
> of statements and expressions within function bodies.
Yeah, that sounds good.
If I can be of any help please let me know.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the Language-c