Alexey Rodriguez:
On Fri, Jul 4, 2008 at 5:03 AM, Manuel M T Chakravarty [EMAIL PROTECTED]
wrote:
The problem is that blah's type is ambiguous, as f does only occur
as an argument to the type family. If you'd define
class Blah f a where
blah :: a - f - T f f a
(and change the rest
On Fri, Jul 4, 2008 at 5:03 AM, Manuel M T Chakravarty [EMAIL PROTECTED]
wrote:
The problem is that blah's type is ambiguous, as f does only occur as an
argument to the type family. If you'd define
class Blah f a where
blah :: a - f - T f f a
(and change the rest of the program
Hi guys,
We are having trouble with the following program that uses type families:
class Blah f a where
blah :: a - T f f a
class A f where
type T f :: (* - *) - * - *
the following function does not type:
wrapper :: forall a f . Blah f a = a - T f f a
wrapper x = blah x
GHC gives
GHC gives the error:
Couldn't match expected type `T f1 f1 a'
against inferred type `T f f a'
In the expression: blah x
In the definition of `wrapper': wrapper x = blah x
actually, GHC gives me could not deduce Blah f a from Blah f1 a
first. It seems that desugaring type
On Thu, Jul 3, 2008 at 7:31 PM, Claus Reinke [EMAIL PROTECTED]
wrote:
GHC gives the error:
Couldn't match expected type `T f1 f1 a'
against inferred type `T f f a'
In the expression: blah x
In the definition of `wrapper': wrapper x = blah x
actually, GHC gives me could not
Alexey Rodriguez:
We are having trouble with the following program that uses type
families:
class Blah f a where
blah :: a - T f f a
class A f where
type T f :: (* - *) - * - *
the following function does not type:
wrapper :: forall a f . Blah f a = a - T f f a
wrapper x = blah x