[Haskell-cafe] Re: ANNOUNCE: fixpoint 0.1
apfelmus
apfelmus at quantentunnel.de
Wed Nov 21 04:17:20 EST 2007
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
More information about the Haskell-Cafe
mailing list