<div dir="ltr"><div>In fact, the documentation location I am interrested in is a library (Nomyx-Language). Sorry, I should have mentionned that!<br></div>I want to access the documentation of Nomyx-Language from Nomyx.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jan 12, 2014 at 10:46 PM, Roman Cheplyaka <span dir="ltr"><<a href="mailto:roma@ro-che.info" target="_blank">roma@ro-che.info</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Except Nomyx is a pure executable[1] and thus won't have a ghc package db entry.<br>
<br>
[1]: <a href="http://hackage.haskell.org/package/Nomyx-0.4.1/Nomyx.cabal" target="_blank">http://hackage.haskell.org/package/Nomyx-0.4.1/Nomyx.cabal</a><br>
<br>
* adam vogt <<a href="mailto:vogt.adam@gmail.com">vogt.adam@gmail.com</a>> [2014-01-12 14:45:48-0500]<br>
<div class="HOEnZb"><div class="h5">> Hi Corentin,<br>
><br>
> One way is to call `ghc-pkg describe Nomyx-0.4.1` and look for the<br>
> line starting with haddock-html. Or maybe look at how ghc-pkg does it<br>
> <<a href="https://github.com/ghc/ghc/blob/master/utils/ghc-pkg/Main.hs" target="_blank">https://github.com/ghc/ghc/blob/master/utils/ghc-pkg/Main.hs</a>>.<br>
><br>
> This can fail sometimes (though perhaps not for documentation), since<br>
> you can have multiple packages with the same name and version<br>
> installed, and I don't know how you can get the ABI hash of a<br>
> dependency into a program.<br>
><br>
> Regards,<br>
> Adam<br>
><br>
><br>
><br>
> On Sun, Jan 12, 2014 at 1:11 PM, Corentin Dupont<br>
> <<a href="mailto:corentin.dupont@gmail.com">corentin.dupont@gmail.com</a>> wrote:<br>
> > Hi guys,<br>
> > I'd like to access, from within my program, the program own haddock<br>
> > documentation.<br>
> > From the cabal autogen path file, I can access the location of the program's<br>
> > data file, binaries etc. (getBinDir, getLibDir, getDataDir) but not the<br>
> > location of the doc. How to do that?<br>
> > For example on my machine:<br>
> ><br>
> > datadir    = "/home/kau/.cabal/share/i386-linux-ghc-7.6.3/Nomyx-0.4.1"<br>
> ><br>
> > The documentation is generated in<br>
> > "/home/kau/.cabal/share/doc/i386-linux-ghc-7.6.3/Nomyx-0.4.1", but it<br>
> > depends on the configuration.<br>
> ><br>
> > Thanks,<br>
> > Corentin<br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > Haskell-Cafe mailing list<br>
> > <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
> > <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
> ><br>
> _______________________________________________<br>
> Haskell-Cafe mailing list<br>
> <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
> <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br></div>