There is a dummy module in my project whose sole purpose is to store the Haddock documentation for the rest of the library. In fact, I do not need to import anything in this module, but if I do not import other modules, Haddock does not associate function names with their modules.
My module is as follows
{- | Lots of Haddock text here... it references 'someFunction'. -} module TopLevelDoc () where import Other.Module.With.SomeFunction
Now, if I create a project, I get this warning:
Warning: The import of `Other.Module.With.SomeFunction' is redundant except perhaps to import instances from `Other.Module.With.SomeFunction' To import instances alone, use: import Other.Module.With.SomeFunction()
If I delete the import or make them () , Haddock will not add someFunction hyperlink to its documentation. If I leave the import as it is, I get a lot of false warnings that I don't like. And I do not want to suppress this warning for the whole project, it can be useful for any other module except this.
Questions:
- How to get a hyperlink to Haddock output without such warnings when creating?
- Can I turn off warnings for each file? (for example, I can do it globally with
ghc-options in .cabal )
source share