Skip to content

ghc panic

Apologies if this is an inappropriate bug report - I'm new to Haskell and haven't figured out how to navigate around the possible errors....

I have now noticed (at least some of) the errors in the following but I get a ghc panic when I load this into ghci:

---rectPolh.hs data Point2D = Cartesian2D Double Double

| Polar2D Double Double

deriving (Eq,show)

instance Eq Point2D where

Cartesian2D x y == Polar2D r theta =

x == rx && y == ry

where rx=r * cos theta

ry=r * sin theta

i.e.

GHCi, version 7.4.2: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude> :load rectPol.hs [1 of 1] Compiling Main ( rectPol.hs, interpreted ) ghc: panic! (the 'impossible' happened)

(GHC version 7.4.2 for x86_64-apple-darwin):

nameModule show{tv aaH}

Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug

Trac metadata
Trac field Value
Version 7.4.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHCi
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information