How to publish docs to hoogle.haskell.org

Hi,

I wasn’t able to find any info about the way how to merge haddocks of my package into hoogle.haskell.org.

Is the only way is publishing package on stackage?

Is it possible to do this without disclosing source code?

1 Like

You can run google locally and have it work — e.g. — inside ghci. You can feed your packages too, see

f@extensa:~$ hoogle generate --help
Hoogle 5.0.17.15, https://hoogle.haskell.org/

hoogle generate [OPTIONS] [PACKAGE]
Generate Hoogle databases
⁝

What are you trying to achieve?

I am trying to get my docs discovered on https://hoogle.haskell.org web page.

I noticed I can run hoogle locally, but running dedicated web server for a package docs is not convenient.

Yes, I believe the only way to get your package searchable on Hoogle is to add your package to Stackage.

I don’t think it is possible to add packages to Hackage, let alone Stackage, without disclosing the source code.

I believe it is very common for companies use a custom Hackage server for their proprietary packages, then it is relatively easy to also host a custom Hoogle instance.

3 Likes

What @jaror said, («Hackage is the Haskell community’s central package archive of open source software.»). Plus: you do not need to run a webserver to have local Hoogle (not the command line version, at least), just slap this in your ~/.ghci:

-- :hoogle Int -> Int e :doc Maybe
:def hoogle \x -> return $ ":!hoogle -q --colour -n 10 \"" ++ x ++ "\""
:def hdoc \x -> return $ ":!hoogle --info \"" ++ x ++ "\""
2 Likes

Is it possible to do this without disclosing source code?

It’s a bit strange to want to publish documentation for a package if you’re not publishing the package itself. How could anyone make use of the documentation if they can’t download the source? Can you give more information about what it is you’re doing?

2 Likes