Opened 7 months ago

Closed 5 months ago

#12456 closed bug (fixed)

Panics when making a quotation as pattern synonym

Reported by: Iceland_jack Owned by:
Priority: normal Milestone: 8.0.2
Component: Compiler Version: 8.0.1
Keywords: PatternSynonyms Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: ghci/should_run/T12456
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


$ ghci -XPatternSynonyms -XViewPatterns -ignore-dot-ghci
GHCi, version 8.0.1:  :? for help
Prelude> :m + Language.Haskell.TH
Prelude Language.Haskell.TH> pattern A :: ExpQ; pattern A <- (undefined -> ()) where A = undefined
ghc: panic! (the 'impossible' happened)
  (GHC version 8.0.1 for x86_64-unknown-linux):
        nameModule system $dIP_a4HS

Please report this as a GHC bug:

Prelude Language.Haskell.TH> 

should we be able to use quotations that are pattern synonyms? I have no use for this.

Change History (4)

comment:1 Changed 5 months ago by RyanGlScott

This works in GHC 8.0.2 and HEAD. It was apparently fixed in f352e5cd7bb629fe0ca3b913bfbe7bee43d62f3a.

comment:2 Changed 5 months ago by Ryan Scott <…>

In fef1df4/ghc:

Add test for #12456

Commit f352e5cd7bb629fe0ca3b913bfbe7bee43d62f3a fixed #12456. Let's add a test
to make sure it stays fixed.

comment:3 Changed 5 months ago by RyanGlScott

Status: newmerge
Test Case: ghci/should_run/T12456

Since this test will also work in GHC 8.0.2, the above commit can be safely merged.

comment:4 Changed 5 months ago by bgamari

Milestone: 8.0.2
Resolution: fixed
Status: mergeclosed
Note: See TracTickets for help on using tickets.