[GHC] #12957: In a record-update construct:ghc-stage2: panic! (the 'impossible' happened)

GHC ghc-devs at haskell.org
Fri Dec 9 23:34:57 UTC 2016


#12957: In a record-update construct:ghc-stage2: panic! (the 'impossible' happened)
-------------------------------------+-------------------------------------
        Reporter:  niteria           |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:
      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 niteria):

 {{{
 diff --git a/compiler/hsSyn/HsExpr.hs b/compiler/hsSyn/HsExpr.hs
 index 78ee4e0..4422ec7 100644
 --- a/compiler/hsSyn/HsExpr.hs
 +++ b/compiler/hsSyn/HsExpr.hs
 @@ -2389,7 +2389,7 @@ matchSeparator LambdaExpr   = text "->"
  matchSeparator ProcExpr     = text "->"
  matchSeparator PatBindRhs   = text "="
  matchSeparator (StmtCtxt _) = text "<-"
 -matchSeparator RecUpd       = panic "unused"
 +matchSeparator RecUpd       = text "{"
  matchSeparator ThPatSplice  = panic "unused"
  matchSeparator ThPatQuote   = panic "unused"
  matchSeparator PatSyn       = panic "unused"
 }}}

 makes the panic go away, but the error isn't very nice:

 {{{
 [1 of 1] Compiling Repro            ( Repro.hs, Repro.o )

 Repro.hs:22:35: warning: [-Woverlapping-patterns]
     Pattern match has inaccessible right hand side
     In a record-update construct: BFields ds_dFp { ...
 }}}

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


More information about the ghc-tickets mailing list