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:
http://thread.gmane.org/gmane.comp.python.devel/126754
http://thread.gmane.org/gmane.comp.python.devel/126760
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 """
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:
http://thread.gmane.org/gmane.comp.python.devel/126754
http://thread.gmane.org/gmane.comp.python.devel/126760