On 07/04/2010 01:49 PM, Sjoerd Visscher wrote:
> 
> On Jul 4, 2010, at 11:31 AM, Andrew Coppin wrote:
>  
>>>> type family F f a :: *
>>>> class RFunctor f where
>>>>  (%) :: f a b -> (a -> b) -> F f a -> F f b
>>>>    
>>
>> I have literally no idea what a type family is. I understand ATs (I think!), 
>> but TFs make no sense to me.
>>
>> (For this reason, most if not all of the rest of this post doesn't make 
>> sense.)
> 
> I would have liked to use ATs here, like this:
> 
>> class RFunctor f where
>>   type F f a :: *
>>   (%) :: f a b -> (a -> b) -> F f a -> F f b
> 
> But this isn't valid as ATs require all type variables to be in scope, and 
> 'a' isn't. 
> There's a GHC ticket for this: http://hackage.haskell.org/trac/ghc/ticket/3714

This works (on my ghc-6.12.2):

> class Rfunctor f where
>     type F f :: * -> *
>     (%) :: f a b -> (a -> b) -> F f a -> F f b

> [...]

-- Steffen
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to