title: Running Haddock on its own
body: <p>I would like to start using Haddock; the primary reason is not that I do (or anyone else does) need nice HTML documentation for what I'm writing right now, but that it will teach me a standardized way commenting Haskell modules.
  For this reason, I'd like to get my hands dirty with it, but I've run into a pretty basic problem.</p>
  
  <p>Source:</p>
  
  <pre class="lang-hs prettyprint-override"><code>module Main where
  -- |This is the main function.
  main = putStrLn "Hello World!"
  </code></pre>
  
  <p>Haddock invocation:</p>
  
  <pre class="lang-none prettyprint-override"><code>&gt; haddock -h test.hs 
  Haddock coverage:
    50% (  1 /  2) in 'Main'
  Warning: Main: could not find link destinations for:
      GHC.Types.IO
  </code></pre>
  
  <p>It looks like Haddock doesn't know where to look for the standard libraries, but that's just a wild guess. The docs say something about a "-B" parameter, but are not really explaining much about it.</p>
  
  <p>I've searched for the problem online, and it was basically answered with "use a Cabal package and it'll do everything for you". However, I would much rather not deal with Cabal right now, but learn Haddock on its own (Cabal can wait). Is there a nice and easy(ish) solution to the problem?</p>