Opened 5 weeks ago

Closed 5 weeks ago

#14241 closed bug (duplicate)

Pattern synonyms defined through other pattern synonyms produce `impossible happened` in ghci/runhaskell

Reported by: Heimdell Owned by:
Priority: normal Milestone:
Component: Compiler Version: 8.0.1
Keywords: PatternSynonyms Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: GHCi crash Test Case:
Blocked By: Blocking:
Related Tickets: #12007 Differential Rev(s):
Wiki Page:

Description

This module content (Bug.hs)

{-# language PatternSynonyms #-}

data A a = A a

pattern B a = A a
pattern C a = B a

causes ghci/runhaskell to fail:

> :l Bug
[1 of 1] Compiling Main             ( Bug.hs, interpreted )
ghc: panic! (the 'impossible' happened)
  (GHC version 8.0.1 for x86_64-unknown-linux):
	kindPrimRep.go rep_a1r0

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

When using ghc everything compiles and even works, so adding the code

main = do
  let C a = A 1
  print a

produced executable that prints "1".

Change History (2)

comment:1 Changed 5 weeks ago by Heimdell

Summary: Pattern synonyms defined through other pattern synonyms produce `impossible happened`Pattern synonyms defined through other pattern synonyms produce `impossible happened` in ghci/runhaskell

comment:2 Changed 5 weeks ago by RyanGlScott

Resolution: duplicate
Status: newclosed

Thanks for the the bug report. This is a duplicate of #12007, which has been fixed since GHC 8.0.2.

Note: See TracTickets for help on using tickets.