Working with ASTs

Seems possible with Cassette’s contextual dispatch, some macro magic and Turing! Think of all the parameters and the logpdf accumulator as part of the context. The variable can be uniquely identified by its symbol, the module, directory, file and line, etc, which can all be expanded by the macro at parse time. Then all of these can be passed to some innocent looking function that’s then interjected by Cassette’s overdub to update the parameter values and logpdf in the Turing context. Of course, there may be a lot of quirks along the way, but the idea seems promising.