
What should I be using for the file name for the read-interface option in haddock? Trying to use the file on www.haskell.org gives this: dom@lagrange:~/asn15/asn1> haddock -html -o hdoc Pretty.hs -B /usr/lib/ghc-6.8.2 --optghc="-fglasgow-exts" --read-interface=http://www.haskell.org/ghc/docs/latest/html/libraries/base,http://www.haskel... haddock: internal Haddock or GHC error: http://www.haskell.org/ghc/docs/latest/html/libraries/base/base.haddock: openBinaryFile: does not exist (No such file or directory) But if I download the file and try and use it locally, I get this dom@lagrange:~/asn15/asn1> haddock -v -html -o hdoc Pretty.hs -B /usr/lib/ghc-6.8.2 --optghc="-fglasgow-exts" --read-interface=http://www.haskell.org/ghc/docs/latest/html/libraries/base,base.haddock Warning: Cannot read base.haddock: "Magic number mismatch: couldn't load interface file: base.haddock" Skipping this interface. Warning: main:Language.ASN1: could not find link destinations for: GHC.Enum.Enum GHC.Base.Eq GHC.Base.Ord GHC.Show.Show GHC.Num.Integer Language.ASN1.ComponentIndex Language.ASN1.Tagged GHC.Base.String Data.Maybe.Maybe Language.ASN1.Octet Data.Map.Map Warning: main:Pretty: could not find link destinations for: Text.PrettyPrint.HughesPJ.Doc Pretty.Pretty Pretty.PrettyVal Warning: main:ConstrainedType: could not find link destinations for: Data.Maybe.Maybe GHC.Base.Bool GHC.Num.Integer Pretty.Pretty Pretty.PrettyVal GHC.Base.String GHC.Base.Eq GHC.Show.Show GHC.Base.Int GHC.Word.Word8 GHC.Base.Ord Data.Monoid.Monoid Data.Binary.Strict.BitPut.BitPut GHC.Real.Integral Control.Monad.State.Class.MonadState Data.ByteString.Internal.ByteString Control.Monad.Error.Class.MonadError GHC.Base.Char Data.Binary.Strict.BitGet.BitGet Any help would be appreciated. Dominic.

2008/3/24, Dominic Steinitz
What should I be using for the file name for the read-interface option in haddock?
You must use a file that is on your own hard drive and that is generated with version 2.0 of Haddock, since that is what you're using. The interface file format was changed in Haddock 2.0 due its use of GHC data types, so you can't use 0.x interface files. You need to generate base.haddock with Haddock 2.0. One way to do that, is to make sure Haddock 2.0 is installed, then get the GHC 6.8.2 sources (with core libs) and build that with Haddock docs enabled. Hope this helps, David

David Waern
2008/3/24, Dominic Steinitz
: What should I be using for the file name for the read-interface option in haddock?
You must use a file that is on your own hard drive and that is generated with version 2.0 of Haddock, since that is what you're using. The interface file format was changed in Haddock 2.0 due its use of GHC data types, so you can't use 0.x interface files.
You need to generate base.haddock with Haddock 2.0. One way to do that, is to make sure Haddock 2.0 is installed, then get the GHC 6.8.2 sources (with core libs) and build that with Haddock docs enabled.
Hope this helps, David
Thanks I've done this dom@lagrange:~/asn15/asn1> haddock -v -html -o hdoc Pretty.hs -B /usr/lib/ghc-6.8.2 --optghc="-fglasgow-exts" --read-interface=http://www.haskell.org/ghc/docs/6.8.2/html/libraries/base,/home/dom/ghc-6.8.... but now when I click on e.g. Integer I get directed to http://www.haskell.org/ghc/docs/6.8.2/html/libraries/base/GHC-Num.html#t%3AI... which doesn't exist. Integer actually exists in http://www.haskell.org/ghc/docs/6.8.2/html/libraries/base/Prelude.html#t%3AI... What do I need to do to get haddock to point at the right links? Dominic.
participants (2)
-
David Waern
-
Dominic Steinitz