[Haskell-cafe] Instrumentation without requiring code-level changes?
dct25-561bs at mythic-beasts.com
Fri Jan 27 08:38:25 UTC 2017
I doubt it'll be removed, it's occasionally useful and I don't think it
costs much to maintain.
The note does indicate that your proposed usage isn't exactly recommended,
and I agree: I would instrument everything all the time, to avoid all the
problems associated with monkey-patching and having two different sets of
performance characteristics to worry about, but it is at least possible to
do what you're trying to do with this method.
On 27 Jan 2017 08:30, "Saurabh Nanda" <saurabhnanda at gmail.com> wrote:
Yes, I think so, with the PackageImports extension.
Thank you for this. If this works, it makes using instrumentedscotty &
instrumentedopaleye easier to use.. Btw, there's a note in the docs:
[...] Note: you probably don't need to use this feature, it was added
mainly so that we can build backwards-compatible versions of packages when
APIs change. It can lead to fragile dependencies in the common case:
modules occasionally move from one package to another, rendering any
package-qualified imports broken. [...]
I hope GHC doesn't plan to remove this extension any time soon.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe