hackworthltd / primer

A pedagogical functional programming language.
GNU Affero General Public License v3.0
14 stars 1 forks source link

Install documentation for Haskell dependencies #52

Open georgefst opened 3 years ago

georgefst commented 3 years ago

We enabled doHaddock in 8ae175805d1e43ec88d89ba887b8795cc6f7d2fc, which gives us docs on hover in HLS, and therefore must be passing -haddock to GHC. But it's not clear from the documentation whether it's also supposed to replicate Cabal's --enable-documentation flag, which is required for full Haddock browsing functionality in HLS.

Relatedly, cabal haddock vonnegut (or make docs) produces HTML which doesn't contain any links to definitions from external packages, even base. In cabal-based projects, without Nix, I've found that links to libraries which ship with GHC (base, containers, stm etc.) are always present, and --enable-documentation is required for third-party libs.

dhess commented 3 years ago

If we set --enable-documentation in our Cabal files, does that fix both issues?

georgefst commented 3 years ago

If we set --enable-documentation in our Cabal files, does that fix both issues?

No, it doesn't seem to make any visible difference.

(that is, adding documentation: True to vonnegut/backend/cabal.project, which should be the same as passing --enable-documentation to every invocation of cabal build etc.)

dhess commented 3 years ago

Can you file this as an issue against haskell.nix? It sounds like something might be going on under the hood that's causing this not to work as expected.

georgefst commented 3 years ago

Can you file this as an issue against haskell.nix?

Sure. I might need to keep it simple and tag you if they have any questions though - I'm not too sure on the details of our setup.

dhess commented 3 years ago

As mentioned in chat, I'll deal with this as I'm fairly familiar with haskell.nix and the maintainers.