Roman Leshchinskiy wrote:
apfelmus wrote:
Making f an associacted type synonym / fundep instead of a
associated data type is still worth it, since we can use it for Mu f
But alas, this breaks hylomorphisms:
hylo :: Fixpoint t => (Pre t s -> s) -> (p -> Pre t p) -> p -> s
If Pre is a type function, there is no way to infer t.
Ah, right. But unlike size , this is unambiguous since t can (and
probably should) be fused away:
hylo :: Functor f => (f s -> s) -> (p -> f p) -> p -> s
hylo f g = f . fmap (hylo f g) . g
Regards,
apfelmus
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe