type family (f :: a -> b) <$> (xs :: [a]) :: [b]
where
_ <$> [] = []
f <$> (x : xs) = f x : f <$> xs
class Functor f => Applicative' f
where
distrib :: HList (f <$> xs) -> f (HList xs)
Well what I'm claiming is that it's neither a generalization nor a specialization, it's exactly equivalent. I'm not sure though. Do you think there's more Applicative's than Monoidal/Applicatives?
Does it make sense to say a functor is applicative iff it distributes over heterogeneous lists?
That's just generalization of
Monoidal
, isn't it?Well what I'm claiming is that it's neither a generalization nor a specialization, it's exactly equivalent. I'm not sure though. Do you think there's more
Applicative'
s thanMonoidal
/Applicative
s?"Generalization" as in "it uses more general version of product, not just 2-tuple"
Ah, I see. What I'm hoping is that the 2-tuple + 0-tuple version is nevertheless equivalent.
You can write
so they should be I guess
(haven't typechecked this though)