Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#9705 closed bug (fixed)

Panic on a pattern synonym in a class

Reported by: monoidal Owned by: cactus
Priority: normal Milestone: 7.8.4
Component: Compiler (Type checker) Version: 7.8.3
Keywords: PatternSynonyms Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Compile-time crash Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

This silly code causes a panic in rnMethodBind:

{-# LANGUAGE PatternSynonyms #-}
class C a where
  pattern P = ()

Change History (8)

comment:1 Changed 3 years ago by simonpj

Owner: set to cactus

comment:2 Changed 3 years ago by cactus

Status: newpatch

I've pushed a fix for this to the wip/T9705 branch.

comment:3 Changed 3 years ago by monoidal

The patch looks good to me.

comment:4 Changed 3 years ago by Dr. ERDI Gergo <gergo@…>

In e5ba36080d08791f44e3bed37721f702e242af96/ghc:

rnMethodBind: reject pattern synonyms in instance definitions (fixes #9705)

comment:5 Changed 3 years ago by cactus

Status: patchmerge

comment:6 Changed 3 years ago by cactus

Component: CompilerCompiler (Type checker)
Keywords: pattern synonyms added

comment:7 Changed 3 years ago by thoughtpolice

Milestone: 7.8.4
Resolution: fixed
Status: mergeclosed

Merged to ghc-7.8.

comment:8 Changed 3 years ago by cactus

Keywords: PatternSynonyms added; pattern synonyms removed
Note: See TracTickets for help on using tickets.