[GHC] #14963: ghci -fdefer-type-errors can't run IO action from another module
GHC
ghc-devs at haskell.org
Fri Mar 23 00:03:56 UTC 2018
#14963: ghci -fdefer-type-errors can't run IO action from another module
-------------------------------------+-------------------------------------
Reporter: elaforge | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: GHCi | Version: 8.4.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
This is enough to trigger a crash on OS X and Linux:
Bug1.hs:
{{{
module Bug1.hs where
import qualified Bug2
test :: IO Bool
test = Bug2.failure
}}}
Bug2.hs:
{{{
module Bug2 where
failure :: IO Bool
failure = return False
}}}
Shell:
{{{
% ghci -fdefer-type-errors -ignore-dot-ghci
GHCi, version 8.4.1: http://www.haskell.org/ghc/ :? for help
Prelude> :load Bug
[1 of 2] Compiling Bug2 ( Bug2.hs, interpreted )
[2 of 2] Compiling Bug ( Bug.hs, interpreted )
Ok, two modules loaded.
*Bug> test
ghc: panic! (the 'impossible' happened)
(GHC version 8.4.1 for x86_64-apple-darwin):
nameModule
system $dShow_a1LX
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/utils/Outputable.hs:1150:37 in
ghc:Outputable
pprPanic, called at compiler/basicTypes/Name.hs:241:3 in ghc:Name
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}}
This is specific to 8.4.1, in 8.0.2 I get "False" as expected. If I leave
off -fdefer-type-errors, it works. It also seems to be ghci only,
compiling with -fdefer-type-errors doesn't have the problem.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14963>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list