By: Tom Sydney Kerckhove <syd@cs-syd.eu>
Attach a comment above an ANN pragma to the definition under it
GHC parses {-# ANN foo ... #-} as a declaration, so it was the next declaration
a comment above one attached to, and that declaration carried the name
"declaration", which nothing else in the module answers to. A comment's scope
is what a suppression is matched against, so an [allow:...] written there
matched no finding and was reported unused, and a tag or a ref there connected
nothing.
An annotation is not a subject, so it gets its own DeclKind and attachment
steps over it. Naming it after what it annotates was the first attempt and is
kept, but not for attachment: a name occurrence inside the pragma is scoped by
it, and a suppression for such a finding has to be writable where the hint says
to write it. Naming alone would have attached a comment above
{-# ANN foo #-} bar to foo, which is worse than the empty scope it replaced.
Total
50m41s
Created Started Finished
| Time to Start | Worker time | Duration | Time to finish | Idle | |
|---|---|---|---|---|---|
| Config | 1m29s | 0s | 0s | 1m30s | 1m29s |
| Eval | 1m30s | 8s | 8s | 1m38s | 0s |
| Build | 1m38s | 0s | 50m32s | 52m11s | 50m32s |
| Suite | 1m29s | 9s | 50m41s | 52m11s | 52m01s |