Haskell - Glasgow-haskell-users
only in this topic
Open this post in threaded view
Given a module with top-level (functions) f1 ... fn,
I would like to generate/compile an "instrumented"
version where, say, each function prints the string
"hello", every time it is called.
Can anyone suggest some ways of doing this?
One option is a core-to-core transform with an
unsafePerformIO (print "hello")
stuck into the appropriate places. But perhaps there
are better ways? Ideally I'd like to instrument each
"App" to log every function application.
Are other libraries or tools that use the GHC API
to do this sort of thing?
Thanks in advance!
Glasgow-haskell-users mailing list
Return to Haskell - Glasgow-haskell-users
1 view|%1 views
Free forum by Nabble
Edit this page