haskell / haskell/cabal

With TH, when doing "cabal haddock", GHCi "couldn't find symbol"

Open
#888 4 comments 0 reactions 0 assignees View on GitHub
Cabal: other old-milestone: ⊥ type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

(Imported from [Trac #898](http://hackage.haskell.org/trac/hackage/ticket/898), reported by MikolajKonarski on 2011-11-11)

GHC 7.2.1, Cabal HEAD, Haddock 2.9.2. The message

During interactive linking, GHCi couldn't find the following symbol:

Allurezm0zi4zi2_UtilsziMultiline_multiline_closure
How to reproduce: get package [http://hackage.haskell.org/package/Allure-0.4.2](http://hackage.haskell.org/package/Allure-0.4.2), cabal install, cabal haddock --executables and you should get the following:

Running Haddock for Allure-0.4.2...

Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: ConfigFile-1.1.1, HUnit-1.2.4.2,
MissingH-1.1.1.0, ffi-1.0, rts-1.0, cairo-0.12.1, deepseq-1.1.0.2, gio-0.12.1,
glib-0.12.1, gtk-0.12.1, hslogger-1.1.5, mtl-2.0.1.0, network-2.3.0.6,
pango-0.12.1, parsec-3.1.2, random-1.0.1.0, regex-base-0.93.2,
regex-compat-0.95.1, regex-posix-0.95.1, text-0.11.1.6, transformers-0.2.2.0,
zlib-0.5.3.1
Preprocessing executable 'BotAllure' for Allure-0.4.2...
haddock coverage for dist/build/tmp-28531/src/Bot.hs: 0/3 0%
Warning: Main: could not find link destinations for:
System.Random.StdGen
Documentation created: dist/doc/html/Allure/BotAllure/index.html
Preprocessing executable 'Allure' for Allure-0.4.2...
haddock coverage for dist/build/autogen/Paths_Allure.hs: 0/4 0%
haddock coverage for dist/build/tmp-28531/src/Utils/File.hs: 0/3 0%
haddock coverage for dist/build/tmp-28531/src/Frequency.hs: 0/6 0%
haddock coverage for dist/build/tmp-28531/src/Strategy.hs: 1/7 14%
haddock coverage for dist/build/tmp-28531/src/Content/Content.hs: 0/2 0%
haddock coverage for dist/build/tmp-28531/src/Utils/Multiline.hs: 1/2 50%
During interactive linking, GHCi couldn't find the following symbol:
Allurezm0zi4zi2_UtilsziMultiline_multiline_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
The same problem for a library, with or without executables, with the same code. Hiding, in the library, the offending module Multiline does not help. The only thing that helps is eta-expanding the Multiline code as follows:

-multiline  = TQ.QuasiQuoter (TH.litE . TH.stringL) undefined undefined undefined

+multiline = TQ.QuasiQuoter (\x -> (TH.litE . TH.stringL) x) undefined undefined undefined
and _not_ using the function in the only place where it's used.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.