Allow putting SCC annotations on class instance methods
Perhaps there's a way to do this that I don't know about.
Here's a file:
module Test where
class C a where
foo :: a -> String
instance C Int where
-- this would be a parse error: {-# SCC foo #-}
foo a = show a
I want to put a cost center on foo. Like mentioned in the comment, doing that in the obvious way is a parse error.
Interestingly -fprof-auto-top puts a cost center on foo.
This came up when debugging #14637.
Trac metadata
| Trac field | Value |
|---|---|
| Version | |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Profiling |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |