我正在尝试记录一些非常可怕的类型类约束,并解释为什么需要它们,但我似乎无法在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发布于 2018-07-28 14:15:23
没有任何方法可以在最新版本的Haddock中实现这一点。
顺便提一下,这个想法以前也被提出过:https://github.com/haskell/haddock/issues/472#issuecomment-257136046。不过我不会屏住呼吸--这需要对Haddock存储文档字符串的方式进行一些真正的核心更改。
https://stackoverflow.com/questions/51568404
复制相似问题