#7566 closed bug (duplicate)

exception when loading

Reported by: j4hr0m Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.6.1
Keywords: Cc:
Operating System: Windows Architecture: x86
Type of failure: None/Unknown Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

when i save

data EinPunkt = Punkt Float Float

instance (Eq,Show) EinPunkt where
   Punkt x y == Punkt x' y' = x == x' && y == y'
   show Punkt x y = "x: " ++ show x ++ ", y: " ++ show y

as point.hs and load it using WinGHCi 1.0.6 afterwards, i get

> :load "point.hs"
[1 of 1] Compiling Main             ( point.hs, interpreted )
*** Exception: compiler\rename\RnSource.lhs:429:14-81: Irrefutable pattern failed for pattern Data.Maybe.Just (inst_tyvars,
                                                        _,
                                                        SrcLoc.L _ cls,
                                                        _)

Change History (1)

comment:1 Changed 15 months ago by monoidal

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

This is already fixed in GHC 7.6, bug #5951. (You compile your code by writing "instance Eq EinPunkt?" and "instance Show EinPunkt?" separately.)

Note: See TracTickets for help on using tickets.