Re: [Haskell-cafe] Possible bug in GHC 7.0.3

2011-06-29 Thread Daniel Fischer
On Wednesday 29 June 2011, 11:37:39, Yitzchak Gale wrote: > > So it's the derived Read instance in this context that > is causing the problem. Here is a slightly smaller test > case that triggers the bug: > > {-# LANGUAGE MultiParamTypeClasses, UndecidableInstances #-} > module Bug where > class

Re: [Haskell-cafe] Possible bug in GHC 7.0.3

2011-06-29 Thread Yitzchak Gale
Daniel Fischer wrote: > No, the instance head is just a type variable, not a type constructor > applied to type variables Oops, you're right. GHC was telling the truth, I should have paid closer attention! Fixing my minimal example, I get: {-# LANGUAGE MultiParamTypeClasses, UndecidableInstances

Re: [Haskell-cafe] Possible bug in GHC 7.0.3

2011-06-29 Thread Daniel Fischer
On Wednesday 29 June 2011, 10:22:20, Yitzchak Gale wrote: > Ryan Ingram wrote: > > So this is definitely a GHC bug, but I think the problem is probably > > triggered by this line: > > > > instance Serializable a b => IResource a > > > > I don't think this is a valid instance declaration without

Re: [Haskell-cafe] Possible bug in GHC 7.0.3

2011-06-29 Thread Alberto G. Corona
http://hackage.haskell.org/trac/ghc/ticket/5287 El 29/06/2011 10:22, "Yitzchak Gale" escribió: > Ryan Ingram wrote: >> So this is definitely a GHC bug, but I think the problem is probably >> triggered by this line: >> >> instance Serializable a b => IResource a >> >> I don't think this is a valid

Re: [Haskell-cafe] Possible bug in GHC 7.0.3

2011-06-29 Thread Yitzchak Gale
Ryan Ingram wrote: > So this is definitely a GHC bug, but I think the problem is probably > triggered by this line: > > instance  Serializable a b => IResource a > > I don't think this is a valid instance declaration without a functional > dependency on Serializable, as it's impossible to know whic

Re: [Haskell-cafe] Possible bug in GHC 7.0.3

2011-06-29 Thread Alberto G. Corona
Ryan' P robably the read instance can not be infered without the functional dependency but the bug is also triggered with it. I simplified ithe coder as much as possible El 29/06/2011 02:26, "Ryan Ingram" escribió: ___ Haskell-Cafe mailing list Haskell-C

Re: [Haskell-cafe] Possible bug in GHC 7.0.3

2011-06-28 Thread Ryan Ingram
So this is definitely a GHC bug, but I think the problem is probably triggered by this line: instance Serializable a b => IResource a I don't think this is a valid instance declaration without a functional dependency on Serializable, as it's impossible to know which type 'b' to use in the method

Re: [Haskell-cafe] Possible bug in GHC 7.0.3

2011-06-28 Thread Alberto G. Corona
Reported: http://hackage.haskell.org/trac/ghc/ticket/5287 2011/6/28 Alberto G. Corona > > 2011/6/28 Jason Dagit > >> On Tue, Jun 28, 2011 at 3:43 AM, Alberto G. Corona >> wrote: >> > I have an "'impossible' happened" error. >> > The code may look a little bit convoluted but it is part of my re

Re: [Haskell-cafe] Possible bug in GHC 7.0.3

2011-06-28 Thread Jason Dagit
On Tue, Jun 28, 2011 at 3:43 AM, Alberto G. Corona wrote: > I have an "'impossible' happened" error. > The code may look a little bit convoluted but it is part of my real code.: I don't know why it's crashing, but did you already report it as a bug? If not, you definitely should. > Please repor

[Haskell-cafe] Possible bug in GHC 7.0.3

2011-06-28 Thread Alberto G. Corona
I have an "'impossible' happened" error. The code may look a little bit convoluted but it is part of my real code.: - begin of code-- {-# LANGUAGE FlexibleInstances, UndecidableInstances , MultiParamTypeClasses #-} class Serializable a b class IRe