Re: #16367: Panic when trying to openFile with -fdefer-type-errors (was: Panic when trying to openFile)

"GHC" <[email protected]>
Newsgroups gmane.comp.lang.haskell.glasgow.bugs
Message-ID <[email protected]>
#16367: Panic when trying to openFile with -fdefer-type-errors
----------------------------------+--------------------------------------
        Reporter:  vilem          |                Owner:  (none)
            Type:  bug            |               Status:  new
        Priority:  normal         |            Milestone:
       Component:  GHCi           |              Version:  8.4.4
      Resolution:                 |             Keywords:
Operating System:  MacOS X        |         Architecture:  x86_64 (amd64)
 Type of failure:  Runtime crash  |            Test Case:
      Blocked By:                 |             Blocking:
 Related Tickets:                 |  Differential Rev(s):
       Wiki Page:                 |
----------------------------------+--------------------------------------
Changes (by vilem):

 * version:  8.4.3 => 8.4.4


Old description:

> {{{
> $ stack repl
>
> Note: No local targets specified, so a plain ghci will be started with no
> package hiding or package options.
>
>       If you want to use package hiding and options, then you can try one
> of the following:
>
>       * If you want to start a different project configuration than
> /Users/vl200/.stack/global-project/stack.yaml, then you can use stack
> init to create a new
>         stack.yaml for the packages in the current directory.
>
>       * If you want to use the project configuration at
> /Users/vl200/.stack/global-project/stack.yaml, then you can add to its
> 'packages' field.
>
> Configuring GHCi with the following packages:
> GHCi, version 8.4.3: http://www.haskell.org/ghc/  :? for help
> Loaded GHCi configuration from /Users/vl200/.ghci
> Loaded GHCi configuration from
> /private/var/folders/km/1g5b7h891674vhv9z1g4d9cw0000gn/T/haskell-stack-
> ghci/2a3bbd58/ghci-script
> Prelude> import System.IO
> Prelude System.IO> openFile ".g
> .granule    .gitignore  .ghc        .ghci       .gitconfig
> Prelude System.IO> openFile ".granule" Re
> Read           ReadMode       ReadS          ReadWriteMode  Real
> RealFloat      RealFrac       RelativeSeek
> Prelude System.IO> openFile ".granule" ReadMode
> ghc: panic! (the 'impossible' happened)
>   (GHC version 8.4.3 for x86_64-apple-darwin):
>         nameModule
>   system $dShow_a1QJ
>   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}}}

New description:

 {{{
 ~ ✔︎ ghci
 GHCi, version 8.4.4: http://www.haskell.org/ghc/  :? for help
 Loaded GHCi configuration from /Users/vl200/.ghci
 Prelude> :set -fdefer-type-errors
 Prelude> import System.IO
 Prelude System.IO> openFile ".granule" ReadWriteMode
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.4.4 for x86_64-apple-darwin):
         nameModule
   system $dShow_a1QU
   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
 }}}

 But works fine when I don't :set that option.

 {{{
 ~ ✔︎ ghci
 GHCi, version 8.4.4: http://www.haskell.org/ghc/  :? for help
 Loaded GHCi configuration from /Users/vl200/.ghci
 Prelude> import System.IO
 Prelude System.IO> openFile ".granule" ReadWriteMode
 {handle: .granule}
 Prelude System.IO>
 }}}

--

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16367#comment:2>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.