Skip to content

A possible bug on `ghc-pkg check`: "haddock doesn't exist or isn't a file" on Windows

Summary

There seems some path mismatch on Windows when run ghc-pkg check.

Steps to reproduce

To see which packages are currently available:

run `ghc-pkg list`
$ ghc-pkg list
C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib\package.conf.d
    Cabal-3.10.2.0
    Cabal-syntax-3.10.2.0
    Win32-2.13.4.0
    array-0.5.6.0
    base-4.19.0.0
    binary-0.8.9.1
    bytestring-0.12.0.2
    containers-0.6.8
    deepseq-1.5.0.0
    directory-1.3.8.1
    exceptions-0.10.7
    filepath-1.4.100.4
    (ghc-9.8.1)
    ghc-bignum-1.3
    ghc-boot-9.8.1
    ghc-boot-th-9.8.1
    ghc-compact-0.1.0.0
    ghc-heap-9.8.1
    ghc-prim-0.11.0
    ghci-9.8.1
    haskeline-0.8.2.1
    hpc-0.7.0.0
    integer-gmp-1.1
    mtl-2.3.1
    parsec-3.1.17.0
    pretty-1.1.3.6
    process-1.6.18.0
    rts-1.0.2
    semaphore-compat-1.0.0
    stm-2.5.2.1
    system-cxx-std-lib-1.0
    template-haskell-2.21.0.0
    text-2.1
    time-1.12.2
    transformers-0.6.1.0
    xhtml-3000.2.2.1

C:\Users\Chansey\AppData\Roaming\ghc\x86_64-mingw32-9.8.1\package.conf.d
    (no packages)

Then check consistency of dependencies in the package database, and report packages that have missing dependencies.

run `ghc-pkg check`
$ ghc-pkg check
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/xhtml-3000
.2.2.1-02d5\xhtml.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/xhtml-3000.2.2.1
-02d5 doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/Win32-2.13
.4.0-ba29\Win32.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/Win32-2.13.4.0-b
a29 doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/transforme
rs-0.6.1.0-a711\transformers.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/transformers-0.6
.1.0-a711 doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/time-1.12.
2-4739\time.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/time-1.12.2-4739
 doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/text-2.1-3
ba4\text.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/text-2.1-3ba4 do
esn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/template-h
askell-2.21.0.0-7924\template-haskell.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/template-haskell
-2.21.0.0-7924 doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/stm-2.5.2.
1-8422\stm.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/stm-2.5.2.1-8422
 doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/semaphore-
compat-1.0.0-265c\semaphore-compat.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/semaphore-compat
-1.0.0-265c doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/rts-1.0.2\
rts.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/rts-1.0.2 doesn'
t exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/process-1.
6.18.0-b64d\process.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/process-1.6.18.0
-b64d doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/pretty-1.1
.3.6-5bc6\pretty.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/pretty-1.1.3.6-5
bc6 doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/parsec-3.1
.17.0-ad46\parsec.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/parsec-3.1.17.0-
ad46 doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/mtl-2.3.1-
54c6\mtl.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/mtl-2.3.1-54c6 d
oesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/integer-gm
p-1.1-8e1c\integer-gmp.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/integer-gmp-1.1-
8e1c doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/hpc-0.7.0.
0-888b\hpc.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/hpc-0.7.0.0-888b
 doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/haskeline-
0.8.2.1-cbcb\haskeline.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/haskeline-0.8.2.
1-cbcb doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/ghci-9.8.1
-91ef\ghci.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/ghci-9.8.1-91ef
doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/ghc-prim-0
.11.0-d2c2\ghc-prim.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/ghc-prim-0.11.0-
d2c2 doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/ghc-heap-9
.8.1-fe2f\ghc-heap.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/ghc-heap-9.8.1-f
e2f doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/ghc-compac
t-0.1.0.0-1e8d\ghc-compact.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/ghc-compact-0.1.
0.0-1e8d doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/ghc-boot-t
h-9.8.1-fdfa\ghc-boot-th.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/ghc-boot-th-9.8.
1-fdfa doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/ghc-boot-9
.8.1-39f5\ghc-boot.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/ghc-boot-9.8.1-3
9f5 doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/ghc-bignum
-1.3-daf9\ghc-bignum.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/ghc-bignum-1.3-d
af9 doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/ghc-9.8.1-
f4f4\ghc.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/ghc-9.8.1-f4f4 d
oesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/filepath-1
.4.100.4-6b44\filepath.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/filepath-1.4.100
.4-6b44 doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/exceptions
-0.10.7-9474\exceptions.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/exceptions-0.10.
7-9474 doesn't exist or isn't a directory
Warning: include-dirs: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib\x86_64-windows-ghc-9.8.1\directory-1.3.8.
1-a9dc\include doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/directory-
1.3.8.1-a9dc\directory.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/directory-1.3.8.
1-a9dc doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/deepseq-1.
5.0.0-3a5b\deepseq.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/deepseq-1.5.0.0-
3a5b doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/containers
-0.6.8-18cf\containers.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/containers-0.6.8
-18cf doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/Cabal-synt
ax-3.10.2.0-540c\Cabal-syntax.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/Cabal-syntax-3.1
0.2.0-540c doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/Cabal-3.10
.2.0-9ea7\Cabal.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/Cabal-3.10.2.0-9
ea7 doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/bytestring
-0.12.0.2-14e0\bytestring.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/bytestring-0.12.
0.2-14e0 doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/binary-0.8
.9.1-f682\binary.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/binary-0.8.9.1-f
682 doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/base-4.19.
0.0-efcd\base.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/base-4.19.0.0-ef
cd doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/array-0.5.
6.0-edc7\array.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/array-0.5.6.0-ed
c7 doesn't exist or isn't a directory

It seems that ghc-pkg can not find haddock. However, if you look the directory carefully, these files definitely exist in the folders.

For example,

C:\env\haskell\ghc\ghc-9.8.1-x86_64-unknown-mingw32\lib/../../doc/html/libraries/xhtml-3000.2.2.1-02d5\xhtml.haddock doesn't exist or isn't a file

the path after normalization is

C:/env/haskell/ghc/doc/html/libraries/xhtml-3000.2.2.1-02d5/xhtml.haddock

but this is obviously wrong.

The correct one is

C:/env/haskell/ghc/ghc-9.8.1-x86_64-unknown-mingw32/doc/html/libraries/xhtml-3000.2.2.1-02d5/xhtml.haddock

There seems some path mismatch on Windows.

P.s. This phenomenon only occurs on windows.

Expected behavior

No Warning.

Environment

  • GHC version used: ghc-9.8.1

  • Operating System: Windows 7/10

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information