[GHC] #12101: Regression: Pattern synonyms make GHCi 8.0.1 crash

GHC ghc-devs at haskell.org
Sun May 22 11:50:37 UTC 2016


#12101: Regression: Pattern synonyms make GHCi 8.0.1 crash
-------------------------------------+-------------------------------------
           Reporter:  int-index      |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  GHCi           |           Version:  8.0.1
           Keywords:                 |  Operating System:  Unknown/Multiple
  PatternSynonyms                    |
       Architecture:                 |   Type of failure:  GHCi crash
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
  https://gist.githubusercontent.com |
  /int-                              |
  index/17dfb68fd97f724aef2849d0defae0d6/raw/3dab71756bbafa197b93170310ccabfea8c92120/M.hs|
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 This code:


 {{{
 {-# LANGUAGE PatternSynonyms #-}

 data T = C

 pattern P :: T
 pattern P = C

 pattern P' :: T
 pattern P' = P
 }}}

 compiles fine with both GHC 7.10.3 and 8.0.1. However, if you try to load
 it into GHCi 8.0.1, it panics:


 {{{
 GHCi, version 8.0.1: http://www.haskell.org/ghc/  :? for help
 Prelude> :l M.hs
 [1 of 1] Compiling Main             ( M.hs, interpreted )
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.0.1 for x86_64-unknown-linux):
         kindPrimRep.go rep_a18a

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 }}}

 GHCi 7.10.3 does not crash, therefore it's a regression:


 {{{
 GHCi, version 7.10.3: http://www.haskell.org/ghc/  :? for help
 Prelude> :l M.hs
 [1 of 1] Compiling Main             ( M.hs, interpreted )
 Ok, modules loaded: Main.
 *Main>
 }}}

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


More information about the ghc-tickets mailing list