Opened 2 years ago

Closed 2 years ago

#7701 closed bug (duplicate)

compiler exception when -> is used instead of => in instance definition

Reported by: erantapaa Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.4.2
Keywords: Cc:
Operating System: MacOS X Architecture: x86
Type of failure: Compile-time crash Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

When running ghci on the attached file, the following exception is raised:

*** Exception: compiler/rename/RnSource.lhs:430:14-81: Irrefutable pattern failed for pattern Data.Maybe.Just (inst_tyvars,
                                                        _,
                                                        SrcLoc.L _ cls,
                                                        _)

It seems to stem from accidentally using -> instead of => in the following instance definition:

instance (ListConcat xs ys zs) -> ListConcat (x ::: xs) ys (x ::: zs)
  where listConcat = undefined

Attachments (1)

bug2.hs (508 bytes) - added by erantapaa 2 years ago.
example code

Download all attachments as: .zip

Change History (2)

Changed 2 years ago by erantapaa

example code

comment:1 Changed 2 years ago by monoidal

  • Resolution set to duplicate
  • Status changed from new to closed

Thanks for the report. The bug is fixed in GHC 7.6, see #5951.

Note: See TracTickets for help on using tickets.