[GHC] #708: Error: Data.Generics / Cast
Ralf Lammel
Ralf.Lammel at microsoft.com
Thu Mar 2 04:59:55 EST 2006
Hi,
I have at least simplified your test case; could you resubmit?
Regards,
Ralf
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> mycast (1::Int) :: Maybe Int
ghc.exe: panic! (the `impossible' happened, GHC version 6.4):
nameModule mycast{v ah3m}
Please report it as a compiler bug to glasgow-haskell-bugs at haskell.org,
or http://sourceforge.net/projects/ghc/.
-}
> -----Original Message-----
> From: glasgow-haskell-bugs-bounces at haskell.org
[mailto:glasgow-haskell-
> bugs-bounces at haskell.org] On Behalf Of GHC
> Sent: Thursday, March 02, 2006 1:24 AM
> To: glasgow-haskell-bugs at haskell.org
> Subject: [GHC] #708: Error: Data.Generics / Cast
>
> #708: Error: Data.Generics / Cast
>
----------------------------------------------+-------------------------
--
> --
> Reporter: r.j.rorije at student.utwente.nl | Owner:
> Type: bug | Status: new
> Priority: normal | Milestone:
> Component: Compiler | Version: 6.4.1
> Severity: normal | Keywords:
> Os: Windows | Difficulty: Unknown
> Architecture: x86 |
>
----------------------------------------------+-------------------------
--
> --
> 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]
>
> --
> Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/708>
> GHC <http://www.haskell.org/ghc/>
> The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list