From 9d31dca7288b0e5ff50dd9f44381b70b742755f2 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Sun, 9 Jun 2024 12:15:07 +0200 Subject: Add readme showing reproducer --- README.md | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..8d7332d --- /dev/null +++ b/README.md @@ -0,0 +1,64 @@ +``` +12:14:41 ~/c/haddock-th-foreign-repro$ rm -r dist-newstyle/ + +12:14:43 ~/c/haddock-th-foreign-repro$ cabal build --enable-documentation +Resolving dependencies... +Build profile: -w ghc-9.8.2 -O1 +In order, the following will be built (use -v for more details): + - repro-0.1.0.0 (lib) (first run) +Configuring library for repro-0.1.0.0.. +Preprocessing library for repro-0.1.0.0.. +Building library for repro-0.1.0.0.. +[1 of 3] Compiling F ( src/F.hs, /home/tom/code/haddock-th-foreign-repro/dist-newstyle/build/x86_64-linux/ghc-9.8.2/repro-0.1.0.0/build/F.o, /home/tom/code/haddock-th-foreign-repro/dist-newstyle/build/x86_64-linux/ghc-9.8.2/repro-0.1.0.0/build/F.dyn_o ) +[2 of 3] Compiling A ( src/A.hs, /home/tom/code/haddock-th-foreign-repro/dist-newstyle/build/x86_64-linux/ghc-9.8.2/repro-0.1.0.0/build/A.o, /home/tom/code/haddock-th-foreign-repro/dist-newstyle/build/x86_64-linux/ghc-9.8.2/repro-0.1.0.0/build/A.dyn_o ) + +src/A.hs:5:1: warning: [GHC-66111] [-Wunused-imports] + The import of ‘F’ is redundant + except perhaps to import instances from ‘F’ + To import instances alone, use: import F() + | +5 | import F + | ^^^^^^^^ +[3 of 3] Compiling B ( src/B.hs, /home/tom/code/haddock-th-foreign-repro/dist-newstyle/build/x86_64-linux/ghc-9.8.2/repro-0.1.0.0/build/B.o, /home/tom/code/haddock-th-foreign-repro/dist-newstyle/build/x86_64-linux/ghc-9.8.2/repro-0.1.0.0/build/B.dyn_o ) + +src/B.hs:8:2: warning: [GHC-38417] [-Wmissing-signatures] + Top-level binding with no type signature: foo :: String + | +8 | $([d| foo = $(return $ kaas) |]) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Preprocessing library for repro-0.1.0.0.. +Running Haddock on library for repro-0.1.0.0.. +Warning: The documentation for the following packages are not installed. No +links will be generated to these packages: array-0.5.6.0, base-4.19.1.0, +deepseq-1.5.0.0, ghc-bignum-1.3, ghc-boot-th-9.8.2, ghc-prim-0.11.0, +pretty-1.1.3.6, template-haskell-2.21.0.0 +[1 of 3] Compiling F ( src/F.hs, /tmp/ghc879140_0/ghc_4.o, /tmp/ghc879140_0/ghc_4.dyn_o ) +[2 of 3] Compiling A ( src/A.hs, /tmp/ghc879140_0/ghc_2.o, /tmp/ghc879140_0/ghc_2.dyn_o ) + +src/A.hs:5:1: warning: [GHC-66111] [-Wunused-imports] + The import of ‘F’ is redundant + except perhaps to import instances from ‘F’ + To import instances alone, use: import F() + | +5 | import F + | ^^^^^^^^ +[3 of 3] Compiling B ( src/B.hs, nothing ) + +: error: + +GHC.Linker.Loader.dynLoadObjs: Loading temp shared object failed +During interactive linking, GHCi couldn't find the following symbol: + /tmp/ghc879140_0/libghc_13.so: undefined symbol: some_c_function +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 report this as a GHC bug: + https://www.haskell.org/ghc/reportabug + +load' failed +Warning: Failed to build documentation for repro-0.1.0.0. + +12:14:47 ~/c/haddock-th-foreign-repro$ +``` -- cgit v1.2.3-70-g09d2