Skip to content

Windows: GHC >= 9.0 boot libraries `*.conf` files: problem with the `haddock-html` paths

Summary

On my Windows system, ghc-pkg dump yields for base (extract only) (and similarly for other GHC boot libraries):

name:                 base
version:              4.16.4.0
...
haddock-interfaces:   ${pkgroot}/../../docs/html/libraries/base\base.haddock
haddock-html:         ${pkgroot}/../../docs/html/libraries/base
pkgroot: "C:\\Users\\mikep\\AppData\\Local\\Programs\\stack\\x86_64-windows\\ghc-9.2.7\\lib"

That reflects the content of the C:\Users\mikep\AppData\Local\Programs\stack\x86_64-windows\ghc-9.2.7\lib\package.conf.d\base-4.16.4.0.conf file.

ghc-pkg dump --expand-pkgroot yields, correspondingly (extract only):

name:                 base
version:              4.16.4.0
...
haddock-interfaces:
    C:\Users\mikep\AppData\Local\Programs\stack\x86_64-windows\ghc-9.2.7\lib/../../docs/html/libraries/base\base.haddock

haddock-html:
    C:\Users\mikep\AppData\Local\Programs\stack\x86_64-windows\ghc-9.2.7\lib/../../docs/html/libraries/base

The issue is that there are no such directories. Directory /docs/html/libraries is actually located at: C:\Users\mikep\AppData\Local\Programs\stack\x86_64-windows\ghc-9.2.7\

If ${pkgroot} is to be understood as the directory in which the directory package.conf.d is to be found, then it looks to me that the *.conf files that ship with GHC are wrong as regards haddock-html. An extra /.. has been added to the start of haddock-html, in error.

Steps to reproduce

As above.

Expected behavior

That ghc-pkg dump and, in particular, ghc-pkg dump --expand-pkgroot return the actual path to the haddock-html for GHC's boot libraries.

Environment

  • GHC version used: GHC 9.2.7

Optional:

  • Operating System: Windows
  • System Architecture: x86_64
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information