Skip to content

haddock: Add redact-type-synonyms pragma

{-# OPTIONS_HADDOCK redact-type-synonyms #-} pragma will hide the RHS of type synonyms, and display the result kind instead, if the RHS contains any unexported types.

This implements the idea I pitched in #24819 (comment 621971).

Renders from a not-yet-released project, default:

Without redact-type-synonyms

And with {-# OPTIONS_HADDOCK redact-type-synonyms #-}:

With redact-type-synonyms

(Edit: I changed the word ‘censor’ to ‘redact’, as on reflection I think this feature is better analogized to ‘keeping secret information out of a publication’ than ‘removing objectionable material’.)

Edited by Ryan Hendrickson

Merge request reports

Loading