[GHC] #13984: Panic when using a TH splice in a do bind pattern

GHC ghc-devs at haskell.org
Sun Jul 16 15:32:13 UTC 2017


#13984: Panic when using a TH splice in a do bind pattern
-------------------------------------+-------------------------------------
        Reporter:  mbieleck          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.1-rc3
      Resolution:                    |             Keywords:  panic
                                     |  template-haskell
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):

 * cc: AaronFriel (added)


Comment:

 Aaron, as the author of that patch, what are your thoughts? The problem is
 that `isIrrefutableHsPat` has as an invariant that it should be called
 //after// the renamer (see
 [http://git.haskell.org/ghc.git/blob/f656fba19d0cefe05643ddea35d080ea332a6584:/compiler/hsSyn/HsPat.hs#l639
 here]), but your patch calls `isIrrefutableHsPat` directly from the
 renamer.

 Do you think it's sensible to have `isIrrefutableHsPat` return `False` for
 all Template Haskell splices?

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


More information about the ghc-tickets mailing list