Personal tools

Haddock/FAQ

From HaskellWiki

< Haddock(Difference between revisions)
Jump to: navigation, search
m (Formatting)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
* My version of Haddock does not accept some infix operators like <hask>(#)</hask>.
+
=== My version of Haddock does not accept some infix operators like <hask>(#)</hask> ===
   
: In fact it does, but you have to add spaces between parentheses and the infix symbols sometimes: <hask>( # )</hask>.
+
In fact it does, but you have to add spaces between parentheses and the infix symbols sometimes: <hask>( # )</hask>.
   
* How do I get hyperlinks to definitions in e.g. Haskell98?
+
=== How do I get hyperlinks to definitions in e.g. Haskell98? ===
   
: You must have the relevant documentation installed e.g. ghc-doc. Then you can say e.g.:
+
You must have the relevant documentation installed e.g. ghc-doc. Then you can say e.g.:
: <pre> haddock</pre>
+
<pre>
: <pre>-odir=haddock --html</pre>
+
haddock
: <pre>--read-interface=http://www.haskell.org/ghc/docs/latest/html/libraries/base,/usr/share/doc/packages/ghc-doc/libraries/base/base.haddock</pre>
+
-odir=haddock --html
: <pre>--read-interface=http://www.haskell.org/ghc/docs/latest/html/libraries/haskell98,/usr/share/doc/packages/ghc-doc/libraries/haskell98/haskell98.haddock</pre>
+
--read-interface=http://www.haskell.org/ghc/docs/latest/html/libraries/base,/usr/share/doc/packages/ghc-doc/libraries/base/base.haddock
: <pre>Data/LargeWord.hs</pre>
+
--read-interface=http://www.haskell.org/ghc/docs/latest/html/libraries/haskell98,/usr/share/doc/packages/ghc-doc/libraries/haskell98/haskell98.haddock
: or much easier just use cabal: <pre>./Setup haddock</pre>
+
Data/LargeWord.hs
  +
</pre>
  +
  +
or much easier just use cabal:
  +
  +
<pre>./Setup haddock</pre>
  +
  +
[[Category:FAQ]]

Latest revision as of 00:50, 23 May 2013

[edit] 1 My version of Haddock does not accept some infix operators like
(#)

In fact it does, but you have to add spaces between parentheses and the infix symbols sometimes:
( # )
.

[edit] 2 How do I get hyperlinks to definitions in e.g. Haskell98?

You must have the relevant documentation installed e.g. ghc-doc. Then you can say e.g.:

haddock
    -odir=haddock --html
    --read-interface=http://www.haskell.org/ghc/docs/latest/html/libraries/base,/usr/share/doc/packages/ghc-doc/libraries/base/base.haddock
    --read-interface=http://www.haskell.org/ghc/docs/latest/html/libraries/haskell98,/usr/share/doc/packages/ghc-doc/libraries/haskell98/haskell98.haddock
    Data/LargeWord.hs

or much easier just use cabal:

./Setup haddock