Opened 19 months ago

Closed 19 months ago

Last modified 19 months ago

#12101 closed bug (duplicate)

Regression: Pattern synonyms make GHCi 8.0.1 crash

Reported by: int-index Owned by:
Priority: normal Milestone:
Component: GHCi Version: 8.0.1
Keywords: PatternSynonyms Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: GHCi crash Test Case:
Blocked By: Blocking:
Related Tickets: #12007 Differential Rev(s):
Wiki Page:

Description

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> 

Change History (3)

comment:1 Changed 19 months ago by mpickering

Blocked By: 12007 added
Resolution: duplicate
Status: newclosed

See #12007, no one has worked out what is going on yet.

comment:2 Changed 19 months ago by mpickering

Blocked By: 12007 removed

comment:3 Changed 19 months ago by mpickering

Test Case: https://gist.githubusercontent.com/int-index/17dfb68fd97f724aef2849d0defae0d6/raw/3dab71756bbafa197b93170310ccabfea8c92120/M.hs
Note: See TracTickets for help on using tickets.