Hi all,

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!

Ranjit.
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users

Reply via email to