I'm trying to document some very scary type-class constraints and explaining why they're required, but I can't seem to get the following working in Haddock:
{-|
This will show-up at the top of the module
-}
module Try where
-- | This shows up immediately after the class "header"
class (
-- | PROBLEM: This doesn't work...
Show a -- ^ PROBLEM: Also, this doesn't work
) => Something a where
-- | This shows up as the method's documentation
something :: a -> Int
There isn't any way to make this work with the latest version of Haddock.
This idea has been brought up before in passing: https://github.com/haskell/haddock/issues/472#issuecomment-257136046. I wouldn't hold my breath though - this would require some really core changes to how Haddock stores doc strings.
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