[Haskell-cafe] Haddock seems to generate wrong types in newtype deriving

Brian Hulley brianh at metamilk.com
Sat Apr 22 19:46:19 EDT 2006


Hi -
I have the following code:

data MState = MState -- details omitted
type MonadStateMState = MonadState MState -- necessary for Haddock
newtype ManagerM a =
                 ManagerM (StateT MState IO a)
                 deriving (Monad, MonadIO, MonadStateMState)

which means that ManagerM is an instance of Monad, MonadIO, and MonadState 
MState.
However, the Haddock docs look like:

data ManagerM a
Instances
??? a => Monad (ManagerM a)
??? a => MonadIO (ManagerM a)
??? a => MonadStateMState (ManagerM a)

which doesn't seem at all right to me. I'd have thought it should say:

data ManagerM a
Instances
     Monad ManagerM
     MonadIO ManagerM
     MonadStateMState ManagerM

Is this just a bug in Haddock or am I misunderstanding something about 
Haskell?

Thanks, Brian. 



More information about the Haskell-Cafe mailing list