Launch Haddock by itself

I would like to start using Haddock; the main reason is not that I (or someone else) needs good HTML documentation for what I am writing right now, but that it will teach me a standardized way of commenting on Haskell modules. For this reason, I want my hands to be dirty, but I ran into a rather difficult problem.

Source:

module Main where
-- |This is the main function.
main = putStrLn "Hello World!"

Debug call:

> haddock -h test.hs 
Haddock coverage:
  50% (  1 /  2) in 'Main'
Warning: Main: could not find link destinations for:
    GHC.Types.IO

Haddock doesn't seem to know where to look for standard libraries, but this is just a wild hunch. The docs say something about the "-B" option, but don't really explain anything.

, " Cabal, ". , , (Cabal ). (ish) ?

+5
1

, Cabal. , , - , . , , , .

cabal haddock -v , haddock, :

/usr/local/bin/haddock --prologue=dist/doc/html/notcpp/haddock-prolog1566.txt --dump-interface=dist/doc/html/notcpp/notcpp.haddock --optghc=-package-name --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.1,/usr/local/share/doc/ghc/html/libraries/array-0.4.0.1/array.haddock --read-interface=/usr/local/share/doc/ghc/html/libraries/base-4.6.0.0,/usr/local/share/doc/ghc/html/libraries/base-4.6.0.0/base.haddock --read-interface=/usr/local/share/doc/ghc/html/libraries/containers-0.5.0.0,/usr/local/share/doc/ghc/html/libraries/containers-0.5.0.0/containers.haddock --read-interface=/usr/local/share/doc/ghc/html/libraries/deepseq-1.3.0.1,/usr/local/share/doc/ghc/html/libraries/deepseq-1.3.0.1/deepseq.haddock --read-interface=/usr/local/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0,/usr/local/share/doc/ghc/html/libraries/ghc-prim-0.3.0.0/ghc-prim.haddock --read-interface=/usr/local/share/doc/ghc/html/libraries/integer-gmp-0.5.0.0,/usr/local/share/doc/ghc/html/libraries/integer-gmp-0.5.0.0/integer-gmp.haddock --read-interface=/usr/local/share/doc/ghc/html/libraries/pretty-1.1.1.0,/usr/local/share/doc/ghc/html/libraries/pretty-1.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: Avoiding the C preprocessor via cunning use of Template Haskell --optghc=-fbuilding-cabal-package --optghc=-O --optghc=-odir --optghc=dist/build/tmp-1566 --optghc=-hidir --optghc=dist/build/tmp-1566 --optghc=-stubdir --optghc=dist/build/tmp-1566 --optghc=-i --optghc=-idist/build --optghc=-i. --optghc=-idist/build/autogen --optghc=-Idist/build/autogen --optghc=-Idist/build --optghc=-optP-include --optghc=-optPdist/build/autogen/cabal_macros.h --optghc=-hide-all-packages --optghc=-package-id --optghc=base-4.6.0.0-eac4fa0d0988628e5bd960fef8805b26 --optghc=-package-id --optghc=template-haskell-2.8.0.0-102a52a4fda28374255d0a3a8e99f26c --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-1566/NotCPP/OrphanEvasion.hs dist/build/tmp-1566/NotCPP/Utils.hs

, , , , .

+5

All Articles