3b486a74

Created Started Cancelled

By: Tom Sydney Kerckhove <syd@cs-syd.eu>

Step over an annotation pragma rather than reading it as a subject

Naming the pragma's fact after what it annotates fixed the common case and
broke the uncommon one: where {-# ANN foo #-} sits above bar, the comment
above the pragma came out attached to foo, which is worse than the scope
holding nothing that it replaced, because a suppression written there is
silently scoped elsewhere.

An annotation is not a subject, so it gets its own DeclKind and attachment
walks past it. The name stays, because 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.
GitHub