Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#708 closed bug (fixed)

Compiler error

Reported by: r.j.rorije@… Owned by: simonpj
Priority: normal Milestone: 6.4.2
Component: Compiler Version: 6.4.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

Hi,

I am using Data.Generics and type classes to be able to compare values on their most inner type. Doing this a compiler bug occurred. I have tried to find a minimum example that crashed. The example I found may be not as minimal as you would like, though. I can not track down the exact source of the error, but the error occurs only when using the function mycast. when both implementations of mycast are removed no error occurs.

I hope I made the problem clear enough, otherwise, feel free to contact me.

source of the bug-example: http://wwwhome.cs.utwente.nl/~rorijerj/Test.hs

Attachments (1)

Test.hs (1.6 KB) - added by guest 9 years ago.
source (again)

Download all attachments as: .zip

Change History (9)

Changed 9 years ago by guest

source (again)

comment:1 Changed 9 years ago by r.j.rorije@…

  • Summary changed from Error: Data.Generics / Cast to Compiler error

Hi,

Ralf Lammel simplified the test case considerably, even without using Data.Generics or cast, so I do not know where the error comes from anymore, but it should limit the search area.

module Test where

  class C a where
    mycast :: (C b) => a -> Maybe b
    mycast = undefined
    equals :: (C b) => a -> b -> Bool
    equals = undefined

  instance C Int

  data T1 = N11 Int

  instance C T1 where
    mycast (N11 x) = undefined
    x `equals` y = (mycast x :: Maybe Int) == undefined
  {-
  *Test> N11 5 `equals` N11 5
  : panic! (the `impossible' happened, GHC version 6.4.1):
          nameModule mycast{v a1Gt}
  -}

comment:2 Changed 9 years ago by simonmar

  • Milestone set to 6.4.2

comment:3 Changed 9 years ago by simonmar

  • Architecture changed from x86 to Multiple
  • Operating System changed from Windows to Multiple

Confirmed - in fact, the test module elicits an error from -dcore-lint when compiled.

comment:4 Changed 9 years ago by simonpj

  • Owner set to simonpj

comment:5 Changed 9 years ago by simonmar

already fixed in 6.4.2, thanks (test tc200).

comment:6 Changed 9 years ago by simonmar

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

comment:7 Changed 7 years ago by simonmar

  • Architecture changed from Multiple to Unknown/Multiple

comment:8 Changed 7 years ago by simonmar

  • Operating System changed from Multiple to Unknown/Multiple
Note: See TracTickets for help on using tickets.