我是您的助手,可以为您进行文本翻译。以下是需要翻译的内容:
我的Haskell文件(很确定这不是问题)基本上是:
import System.IO
...
-- | Every Word is a String
type Word = String
...
-- | Some documentation for Haddock to see
main :: IO ()
main = do
...
我的
Setup.hs
文件:import Distribution.Simple
main = defaultMain
我的
grade.cabal
文件:name: grade
version: 0.1.0.0
...
build-type: Simple
cabal-version: >=1.8
executable grade
main-is: grade.hs
-- other-modules:
build-depends: base ==4.6.*, split ==0.2.*
hs-source-dirs: src
当我运行
cabal haddock --executables
时,我会得到以下结果:...
Haddock coverage:
Warning: Not found in environment: Main.main
50% ( 1 / 2) in 'Main'
Warning: Main: could not find link destinations for:
Main.main
Documentation created: dist/doc/html/grade/grade/index.html
HTML中包含main
,但没有相关文档说明。它甚至不包含我定义的除main
之外的函数。为什么呢?