
#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: | -------------------------------------+------------------------------------- Comment (by mbieleck): Replying to [comment:2 RyanGlScott]:
`isIrrefutableHsPat` has as an invariant that it should be called //after// the renamer (see [http://git.haskell.org/ghc.git/blob/f656fba19d0cefe05643ddea35d080ea332a6584... here]), but your patch calls `isIrrefutableHsPat` directly from the renamer.
I think the comment you mentioned
Both should be gotten rid of by renamer before isIrrefutablePat is called
may be wrong. The comment [http://git.haskell.org/ghc.git/blob/f656fba19d0cefe05643ddea35d080ea332a6584... here] says:
This is the result of splicing a splice. It is produced by the renamer and consumed by the typechecker. It lives only between the two.
(this is not directly related to the issue, just stumbled upon this while trying to fix this) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13984#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler