4
假設我有一個模塊從內部模塊再出口值:更改爲再出口類型的文檔和值
module My.Cool.Module (SomeType, someValue) where
import My.Cool.Module.Internal (SomeType, someValue)
我想,以示對SomeType
和My-Cool-Module.html
不同文檔someValue
和My-Cool-Module-Internal.html
,因此前者可以討論公共API,後者可以討論它們與其他內部組件的關係。
有沒有辦法用haddock做到這一點?
我想:
module My.Cool.Module (SomeType, someValue) where
import My.Cool.Module.Internal
(SomeType --^a serious type for serious people
, someValue --^a serious value for serious people
)
但是鱈魚給了我一個解析錯誤:
parse error on input ‘--^a serious type for serious people’
難道你不能重新導出函數,只需重新定義它?我的意思是導入'內部'限定並定義'someType = Internal.someType'。這應該允許你添加你自己的文檔。 – mb14
mb14:看起來不錯。重新定義類型似乎有問題。 – rampion
你是對的,我沒有意識到你也在問類型。 – mb14