Re: [Haskell-cafe] Type parameters in type families

2008-03-17 Thread Hugo Pacheco
But by doing so I am changing type equality to the same as having "type family F a :: * -> *" F' a x ~ F' b y <=> F' a ~ F' b /\ x ~ y (equality for ADTs) and I would like this "decomposition rule not to apply" so. Thanks though, hugo On Tue, Mar 18, 2008 at 1:12 AM, Ryan Ingram <[EMAIL PROTEC

Re: [Haskell-cafe] Type parameters in type families

2008-03-17 Thread Ryan Ingram
On 3/17/08, Hugo Pacheco <[EMAIL PROTECTED]> wrote: > type family G a :: * -> * > type instance G Int = Either () -- you forgot this line > > instance Functor (G Int) where >fmap f (Left ()) = Left () >fmap f (Right x) = Right (f x) One thing that you don't seem to be clear about is that t

[Haskell-cafe] Type parameters in type families

2008-03-17 Thread Hugo Pacheco
Hi, I am trying to understand some differences of parameterizing or not some arguments of type families. I have some code such as *type family G a :: * -> * instance Functor (G Int) where fmap f (Left ()) = Left () fmap f (Right x) = Right (f x) ggg :: Functor (G a) => G a x -> G a x ggg