I am trying write haddock for record fields on an interface. Only some of the fields are exported so I only want some of them documented. I read the documentation page here: http://www.haskell.org/haddock/doc/html/ch03s02.html#id565178
However, I cannot seem to get this to work. Here is the section I am trying to write haddock for:
{-|
Describes a Clients connection and provides an interface for
storing data associated with the client. Each client will be given
a unique cid and are Eq if their cid's are Eq.
A ClientConn comes packaged with two functions for storing additional
information in Strings, lookup and modify. The lookup function
takes a key and returns the current value of the key or the empty
string if it has never been set. The modify function
takes a key and value and updates it such that the next call to
lookup with that key will return the value provided.
-}
data ClientConn = ClientConn { -- | The Unique ID for this client
cid :: Integer,
-- | A lookup function for this client
lookup :: (String -> IO String),
-- | A modify function for this client
modify :: (String -> String -> IO ()),
chandle :: Handle,
host :: Net.HostName,
pid :: Net.PortNumber,
msgList :: List String,
dead :: MVar Bool,
timestamp :: TimeStamp,
tid :: MVar (ThreadId, ThreadId),
lock :: MVar Lock.Lock}
The comment for the data type shows up correctly in the generated haddock. However, none of the records are generated. I would like it to generate for the cid, lookup, and modify records.
Thanks in advance!
The full source can be found here: https://github.com/jcollard/simple-server/blob/master/Network/SimpleServer.hs