Well, ZipList's pure is indeed repeat, but there is nothing about ZipList
restricting it to infinite lists. As long as pure is repeat, I'm pretty
sure any other value can still be finite without violating Applicative's
laws.
On Mar 26, 2012 1:02 PM, "wren ng thornton" <w...@freegeek.org> wrote:

> On 3/26/12 8:16 AM, Jake McArthur wrote:
>
>> This is interesting because it seems to be a counterexample to the claim
>> that you can lift any Num through an Applicative (ZipList, in this case).
>> It seems like maybe that only works in general for monoids instead of
>> rings?
>>
>
> I'm not so sure about that. The Applicative structure of ZipLists is
> specifically defined for infinite lists (cf., pure = repeat). And in the
> case of infinite lists the (+) = zipWith(+) definition works just fine,
> since we don't have to worry about truncation. I wasn't aware that Num was
> supposed to be liftable over any Applicative, but this doesn't seem like a
> counterexample...
>
> --
> Live well,
> ~wren
>
> ______________________________**_________________
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/**mailman/listinfo/haskell-cafe<http://www.haskell.org/mailman/listinfo/haskell-cafe>
>
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to