haddock-use-refs: Eliminate warnings for names referred in Haddock only
Haddock syntax supports hyper links to functions and types mentioned in comments (an identifier enclosed in single quotes). The link is inserted only if the name is fully qualified or imported in the module. Names referred only in module documentation pose a problem in form of compiler warning about unused imports.
This library helps with resolving these warnings authomatically without disabling all warnings of such type via a TH macro countDockRefs, which discovers all names in module documentation and generates a dummy type with an instance CountHaddockRefs using all names in the method.
{-# OPTIONS_GHC -Wall -Werror #-} {-# LANGUAGE TemplateHaskell #-} module Module where import Haddock.UseRefs import System.IO.Unsafe (unsafePerformIO) countDocRefs -- | 'unsafePerformIO' is not used by 'foo'. foo :: Bool foo = True
The library does not require any configuration.
Downloads
- haddock-use-refs-1.0.1.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
Versions [RSS] | 1.0.1 |
---|---|
Change log | changelog.md |
Dependencies | base (<5), cpphs (<2.0), haddock-library (<1.13), template-haskell (<2.24.0.0) [details] |
Tested with | ghc ==9.10.1 |
License | BSD-3-Clause |
Author | Daniil Iaitskov <dyaitskov@gmail.com> |
Maintainer | Daniil Iaitskov <dyaitskov@gmail.com> |
Category | Development |
Home page | https://github.com/yaitskov/haddock-use-refs |
Bug tracker | https://github.com/yaitskov/haddock-use-refs/issues |
Source repo | head: git clone https://github.com/yaitskov/haddock-use-refs.git |
Uploaded | by DaniilIaitskov at 2025-03-12T21:59:57Z |
Distributions | |
Reverse Dependencies | 1 direct, 0 indirect [details] |
Downloads | 5 total (5 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs uploaded by user Build status unknown [no reports yet] |