[GHC] #14963: ghci -fdefer-type-errors can't run IO action from another module

GHC ghc-devs at haskell.org
Tue Jun 5 11:43:30 UTC 2018


#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):

 Replying to [comment:22 tdammers]:
 > As discussed in Hangouts, the problem is even more specific: it only
 appears for expressions entered at the GHCi prompt while defer-type-errors
 is active. Loading modules with defer-type-errors on, then turning it off
 and *then* evaluating expressions at the prompt works just fine.

 It actually turns out that this isn't the case, as the following sample
 GHCi session illustrates:

 {{{
 tobias at zoidberg:~/well-typed/devel/ghc-disable-defer-type-errors/ > ghc
 --interactive Foo.hs -fdefer-type-errors
 GHCi, version 8.4.1: http://www.haskell.org/ghc/  :? for help
 Loaded GHCi configuration from /home/tobias/dotfiles/ghc/.ghc/ghci.conf
 [1 of 1] Compiling Main             ( Foo.hs, interpreted )
 Ok, one module loaded.
 λ> test
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.4.1 for x86_64-unknown-linux):
         nameModule
   system $dShow_a22M
   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

 λ> :set -fno-defer-type-errors
 λ> test
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.4.1 for x86_64-unknown-linux):
         nameModule
   system $dShow_a289
   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

 }}}

 However this probably just means that `:set` doesn't properly unset the
 `fdefer-type-errors` flag. Hmm.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14963#comment:23>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list