Handling @since annotations on primops
As noted in #23634, the @since
docstring annotations typically used to document versioning in Haddock documentation deals with re-exports quite poorly.
Recently I have been making a concerted effort to ensure that newly-introduced primops (which live in ghc-prim:GHC.Prim
) carry a @since
annotation. Since primops are "defined" in ghc-prim
, this annotation gives the ghc-prim
version which introduced the primop. However, both GHC HQ and the CLC are in agreement that ghc-prim
shouldn't be imported by end-users and that they should instead be using GHC.Exts
from base
.
Perhaps we should we reconsider how we document the versioning of primops? Two options would be:
- solve the more general problem of #23634
- introduce the convention that
@since
annotations inGHC.Prim
should rather refer tobase
version numbers