
#14963: ghci -fdefer-type-errors can't run IO action from another module -------------------------------------+------------------------------------- Reporter: elaforge | Owner: tdammers Type: bug | Status: new Priority: high | Milestone: 8.4.2 Component: GHCi | Version: 8.4.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by tdammers): The `:set` turns out to work just fine; I trapped the DynFlags right where GHCi runs those expressions, and both flags that control deferred type errors are now forced off; yet the panic still occurs when running ghci with `-fdefer-type-errors`. From the error message, it seems to me like GHCi is trying to print a module name, but fails, and this only happens when starting up with deferred type errors. I assume the module in question is the `Foo` module just loaded. Another data point is that the panic does not occur when I change the `Foo` module like so: {{{ module Foo where test :: IO () test = return () }}} My hypothesis here is that because GHCi does not print the result of an IO action if its type is `()`, so the whole pretty-printing machinery doesn't run. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14963#comment:24 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler