Neat. I'd sometimes wondered if munging the AST in a decorator to add some new control flow was practical. The code looks a bit fragile but not excessively painful.
I thought about this and wrote a patch for CPython that it also stores the original AST of any compiled function in the function object.
Some discussion about this:
The other option is to wrap the thing decorated in a doc string
@fancy_source_needing_decorator
def foo(s):
"""
put some haskell or DSL stuff in here
"""
Then you don't have to reparse the source, etc etc, but it still gets packaged as a function.