Opened 6 months ago

Closed 6 months ago

#8462 closed bug (duplicate)

Compiler crash on invalid type class instance

Reported by: thomaseding Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.4.2
Keywords: Cc:
Operating System: MacOS X Architecture: Unknown/Multiple
Type of failure: Compile-time crash Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

If you try compiling the following code, the compiler crashes

class Foo a where
    foo :: a -> ()

class Bar a where
    bar :: a -> ()

instance (Foo a) => (Bar a -> ()) where
    bar = undefined

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

Change History (1)

comment:1 Changed 6 months ago by monoidal

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

Thanks for the report. This is already fixed in GHC 7.6, see #5951.

Note: See TracTickets for help on using tickets.