Skip to content

Instantly share code, notes, and snippets.

@Taneb
Created September 26, 2018 15:33
Show Gist options
  • Save Taneb/cafb8a4433298a24a100708a8529495a to your computer and use it in GitHub Desktop.
Save Taneb/cafb8a4433298a24a100708a8529495a to your computer and use it in GitHub Desktop.
Haddock failing example - fails on GHC 8.4.3 cabal-install 2.2.0.0 haddock 2.20.0
module Foo where
import Paths_haddock_fail (getDataDir)
{-# ANN module (const () getDataDir) #-}
name: haddock-fail
version: 0
data-files: foo.txt
license: PublicDomain
author: Nathan van Doorn
maintainer: nvd1234@gmail.com
build-type: Simple
extra-source-files: ChangeLog.md
cabal-version: >=1.10
library
exposed-modules: Foo
other-modules: Paths_haddock_fail
build-depends: base >=4.11 && <4.12
autogen-modules: Paths_haddock_fail
default-language: Haskell2010
import Distribution.Simple
main = defaultMain
@Taneb
Copy link
Author

Taneb commented Sep 26, 2018

$ cabal haddock
Preprocessing library for haddock-fail-0..
Running Haddock on library for haddock-fail-0..
Haddock coverage:
haddock: ^^ Could not load 'haddockzmfailzm0zmDghRsuKfHRGBBYiTzzCh3fr_Pathszuhaddockzufail_getDataDir_closure', dependency unresolved. See top entry above.


ByteCodeLink.lookupCE
During interactive linking, GHCi couldn't find the following symbol:
  haddockzmfailzm0zmDghRsuKfHRGBBYiTzzCh3fr_Pathszuhaddockzufail_getDataDir_closure
This may be due to you not asking GHCi to load extra object files,
archives or DLLs needed by your current session.  Restart GHCi, specifying
the missing library using the -L/path/to/object/dir and -lmissinglibname
flags, or simply by naming the relevant files on the GHCi command line.
Alternatively, this link failure might indicate a bug in GHCi.
If you suspect the latter, please send a bug report to:
  glasgow-haskell-bugs@haskell.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment