Panic when loading file with nested pattern synonyms into ghci
The following code compiles fine for me in GHC 7.10.1, but fails in GHC 8.1.20160502
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ViewPatterns #-}
data Foo a = Foo a a
pattern A a1 a2 = Foo a1 a2
pattern B a1 a2 = A a1 a2
The problem is the nested pattern. Compiling gives:
[1 of 1] Compiling Main ( Bug1.hs, interpreted )
ghc-stage2: panic! (the 'impossible' happened)
(GHC version 8.1.20160502 for x86_64-unknown-linux):
kindPrimRep.go rep_a85f
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.10.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |
Edited by Matthew Pickering