
#10191: Interactive linker crash when partially applying seq# -----------------------------------------+------------------------------- Reporter: mniip | Owner: Type: bug | Status: new Priority: low | Milestone: Component: GHCi | Version: 7.8.4-rc1 Keywords: | Operating System: Linux Architecture: x86_64 (amd64) | Type of failure: GHCi crash Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -----------------------------------------+------------------------------- Consider the following commands: {{{#!hs :set -XMagicHash import GHC.IO import GHC.Prim IO (seq# ()) }}} When the last statement is run in GHCi, the following error message is displayed: {{{ ByteCodeLink.lookupCE(primop) During interactive linking, GHCi couldn't find the following symbol: ghczmprim_GHCziPrimopWrappers_seqzh_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 expression works if I eta-unreduce the `seq#` call: `IO (\x -> seq# () x)`. The problem seems to be exclusive to GHCi: if you put that expression in a file, it works fine when compiled by GHC, and even GHCi works fine when using the resulting `.o` file. When there's no `.o` GHCi still crashes, and eta-unreduction doesn't help anymore (something to with optimizations I guess). I can also reproduce this on the Linux-x86 architecture. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10191 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler