Opened 8 months ago

Closed 8 months ago

#13022 closed bug (duplicate)

Pattern Synonyms using other synonyms causes ghc panic

Reported by: AveryGlitch Owned by:
Priority: normal Milestone:
Component: Compiler Version: 8.0.1
Keywords: PatternSynonyms Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Compile-time crash or panic Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

Here's a (somewhat) minimal example:

{-# LANGUAGE PatternSynonyms #-}

data Some = Thing Int Int


pattern A x = Thing x 0
pattern B x = Thing x 1
pattern C x = Thing x 2

pattern D = C 3

And here's what happened when I tried to load this into ghci:

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

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

Change History (1)

comment:1 Changed 8 months ago by mpickering

Keywords: PatternSynonyms added
Resolution: duplicate
Status: newclosed

This is fixed in HEAD. Duplicate of #12007 . Thanks!

Note: See TracTickets for help on using tickets.