[GHC] #12489: undefined in view pattern inside pattern synonym causes GHC to panic

GHC ghc-devs at haskell.org
Thu Aug 25 16:37:00 UTC 2016


#12489: undefined in view pattern inside pattern synonym causes GHC to panic
-------------------------------------+-------------------------------------
        Reporter:  pkmx              |                Owner:
            Type:  bug               |               Status:  merge
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.1
      Resolution:                    |             Keywords:
                                     |  PatternSynonyms
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  Compile-time      |            Test Case:
  crash                              |  patsyn/should_compile/T12489
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"829b9682969a5dabd3a75b82864c48c2e6a19ee8/ghc"
 829b9682/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="829b9682969a5dabd3a75b82864c48c2e6a19ee8"
 Keep the bindings local during defaultCallStacks

 defaultCallStacks generates evidence bindings for call stacks,
 but wasn't setting the binding site correctly.  As a result
 they were simply discarded in the case of pattern synonyms,
 giving rise to Trac #12489.

 The fix is easy; and I added an ASSERT to catch the error earlier.

 (cherry picked from commit f352e5cd7bb629fe0ca3b913bfbe7bee43d62f3a)
 }}}

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


More information about the ghc-tickets mailing list