gpt4 book ai didi

haskell - 如何使用 Haddock 记录类型类约束?

转载 作者:行者123 更新时间:2023-12-05 06:32:01 24 4
gpt4 key购买 nike

我正在尝试记录一些非常可怕的类型类约束并解释为什么需要它们,但我似乎无法在 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

最佳答案

没有任何方法可以使它与最新版本的 Haddock 一起工作。

这个想法之前顺便提过:https://github.com/haskell/haddock/issues/472#issuecomment-257136046 .不过,我不会屏住呼吸 - 这需要对 Haddock 存储文档字符串的方式进行一些真正的核心更改。

关于haskell - 如何使用 Haddock 记录类型类约束?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51568404/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com