Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/haskell/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/275.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Haskell 独自经营黑线鳕_Haskell_Haddock - Fatal编程技术网

Haskell 独自经营黑线鳕

Haskell 独自经营黑线鳕,haskell,haddock,Haskell,Haddock,我想开始使用黑线鳕;主要原因不是我(或其他任何人)需要很好的HTML文档来完成我现在正在编写的内容,而是它将教会我一种标准化的方法来评论Haskell模块。 出于这个原因,我想用它弄脏我的手,但我遇到了一个相当基本的问题 资料来源: modulemain其中 --|这是主要功能。 main=putStrLn“你好,世界!” Haddock调用: >黑线鳕-h test.hs 黑线鳕覆盖率: “主要”中的50%(1/2) 警告:Main:找不到以下内容的链接目标: GHC.Types.IO 看

我想开始使用黑线鳕;主要原因不是我(或其他任何人)需要很好的HTML文档来完成我现在正在编写的内容,而是它将教会我一种标准化的方法来评论Haskell模块。 出于这个原因,我想用它弄脏我的手,但我遇到了一个相当基本的问题

资料来源:

modulemain其中
--|这是主要功能。
main=putStrLn“你好,世界!”
Haddock调用:

>黑线鳕-h test.hs
黑线鳕覆盖率:
“主要”中的50%(1/2)
警告:Main:找不到以下内容的链接目标:
GHC.Types.IO
看起来Haddock不知道在哪里可以找到标准库,但这只是一个猜测。文档中说了一些关于“-B”参数的内容,但实际上并没有对此进行太多解释


我在网上搜索了这个问题,答案基本上是“使用阴谋集团的软件包,它会为你做一切”。然而,我宁愿现在不跟黑线帮打交道,而是自己学习黑线鳕(黑线帮可以等待)。这个问题有一个好的简单的解决方案吗?

我要回应你的问题评论的智慧,并说,就用阴谋集团吧。这不是额外要学的东西,而是要学的东西,因为它为你处理了所有这些繁琐的细节。你可能需要知道它,因为其他人都使用它,所以你也可以从中受益

为了完整起见,我在我的一个项目上运行了
cabalhaddock-v
,这是它使用的
haddock
调用:

/usr/local/bin/haddock--prologue=dist/doc/html/notcpp/haddock-prolog1566.txt--dump interface=dist/doc/html/notcpp/notcpp.haddock--optghc=-包名--optghc=notcpp-0.2.0.2--hide=notcpp.Utils--verbosity=1--html--read interface=/usr/local share/doc/ghc/html/libraries/array-0.4.0.0.1,/usr/local/share/doc/ghc/html/libraries/array-0.4.0.1/array.haddock——读取接口=/usr/local/share/doc/ghc/libraries/base-4.6.0.0、/usr/local/share/doc/doc/ghc/html/html/html/html/html/html/html/libraries/base-4.6.0.0/base.haddock——读取接口=/usr/local/share/doc/ghc/html/libraries/containers-0.0.0.0.0,/usr/local/share/doc/ghc/html/libraries/containers-0.5.0.0/containers.haddock——读取接口=/usr/local/share/doc/doc/ghc/html/libraries/deepseq-1.3.0.1/deepseq.haddock——读取接口=/usr/local/share/doc/ghc/html/libraries/ghc-prim-0.3.0,/usr/local/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/ghc-prim.haddock——读取接口=/usr/local/share/doc/ghc/libraries/integer-gmp-0.5.0.0,/usr/local/share/doc/ghc/html/html/html/html/html/libraries/integer-gmp-0.5.0.0/integer-gmp-haddock——读取接口=/usr/local/share/doc/ghc/html/libraries/grary-1.1.0,/usr/local/share/doc/ghc/html/libraries/pretty-1.1.0/pretty.haddock--read interface=/usr/local/share/doc/ghc/html/libraries/template-haskell-2.8.0.0,/usr/local/share/doc/ghc/html/libraries/template-haskell-2.8.0.0/template-haskell.haddock--odir=dist/doc/html/notcpp/--title=notcpp-0.2.0.2:通过巧妙地使用模板haskell避免C预处理器--optghc=-fbuilding-cabal包--optghc=-O--optghc=-odir--optghc dist/build/tmp-1566--optghc=-hidir--optghc=-stubdir--optghc=dist/build/tmp-1566--optghc=-i--optghc=-idist/build--optghc=-i--optghc=-idist/build/autogen--optghc=-idist/build--optghc=-optpinclude--optghc=-optPdist/build/autogen/cabal_macros.h--optghc=-hide all-package-id--optghc=base-4.6.0.0-eac4fa0d088628e5b960fef8805b26--optghc=-package-id---optghc=template-haskell-2.8.0.0.0-102a52a544fda2858a3a368c--optghc=-XHaskell98--optghc=-XTemplateHaskell--optghc=-W-B/usr/local/lib/ghc-7.6.1 dist/build/tmp-1566/NotCPP/ScopeLookup.hs dist/build/tmp-1566/NotCPP/LookupValueName.hs dist/build/tmp/ornevasion.hs dist/build/tmp-1566/NotCPP/Utils.hs


现在,我确信其中大部分是可选的,但我不打算花时间研究哪些位是和哪些位不是。

只是想指出一个数据点:我写了很多文档,从未手动调用过
haddock
。没错,haddock自己不知道在哪里找到已安装库的文档,你必须说出来。我不是专家,但是
--read interface=FILE
选项告诉haddock在哪里可以找到文档。然而,让阴谋集团做这件事要简单得多。阴谋集团是为了让你的生活更轻松。为什么要等?我也建议你用。它使很多事情变得更容易(不仅仅是黑线鳕),而且安装起来也很容易。FWIW,每次我要求阴谋集团为任何事情建造黑线鳕时,我都会看到类似的警告。我以为这只是经常发生的事。。。(或者可能只是在Windows上。)