haskell / haddock

Haskell Documentation Tool
www.haskell.org/haddock/
BSD 2-Clause "Simplified" License
362 stars 242 forks source link

Haddock generates Source links to re-exported items without module names (under Nix; possibly in general) #1498

Open lf- opened 2 years ago

lf- commented 2 years ago

I noticed this in Esqueleto although it is probably reproducible in packages with fewer dependencies.

Reproduction:

$ nix-build '<nixpkgs>' -A haskellPackages.esqueleto.doc
/nix/store/9mh0h5ll38wxwan66r79n7ysfvfsw16v-esqueleto-3.5.5.0-doc
$ firefox result-doc/share/doc/esqueleto-3.5.5.0/html/Database-Esqueleto.html#t:PersistField

Then click the Source link next to PersistField, which has an href property of file:///nix/store/d121c0wdrwsnms2m9s48fbw7104rqmbz-persistent-2.13.3.5-doc/share/doc/persistent-2.13.3.5/html/src, missing a file name. This is significantly more troublesome on Hoogle which doesn't show directory contents.

This is likely a related shape of bug as was fixed in #1482 but it's on the module pages rather than in the hyperlinker itself.

Versions:

dev/nixpkgs2 - [remotes/origin/HEAD] » nix-shell -p haskellPackages.ghc

[nix-shell:~/dev/nixpkgs2]$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 9.0.2

[nix-shell:~/dev/nixpkgs2]$ haddock --version
Haddock version 2.25.1, (c) Simon Marlow 2006
Ported to use the GHC API by David Waern 2006-2008
Kleidukos commented 1 year ago

I imagine that this is fixed by #1482. Please do re-open if it is not.

lf- commented 1 year ago

I believe it was not; I can try reproducing again but I remember filing this after having applied that patch.

(fyi i can't reopen myself for some reason)

Kleidukos commented 1 year ago

Great, thank you