Consider the following module
{-# LANGUAGE RecordWildCards #-}
module Example (foo, fuh, fon, fuzz) where
import qualified FirstClassModule (Bar(foo,fuh,fon,fuzz), makeBar)
FirstClassModule.Bar {..} = FirstClassModule.makeBar parameter
parameter :: Int
parameter = 15
The intention is that the the module FirstClassModule
provides a record type Bar
which works a bit like a first class module. Then, the module Example
instantiates the module and uses the RecordWildCards extension to bring the names into scope and make them exportable.
When you run Haddock (version 2.8) on this module, it will interfere the type signatures for the foo
functions and include them in the API documentation. Now, my question is:
Is there a way to document the resulting names
foo
,fuh
, etc. without writing down their type signatures in theExample
module?
I don't want to write the type signatures because in this case because they are boilerplate. If I have to write them down, this module loses its raison d'être.
From the Haddock user manual:
http://www.haskell.org/haddock/doc/html/markup.html#id564988
Note that Haddock doesn't contain a Haskell type system — if you don't write the type signature for a function, then Haddock can't tell what its type is and it won't be included in the documentation.
The documentation is for version 2.8, version 2.9 is the newest.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With