[PRL] circular haskell programs

Matthias Felleisen matthias at ccs.neu.edu
Thu Jun 30 13:43:37 EDT 2005


On Jun 30, 2005, at 1:25 PM, Dave Herman wrote:

>>> You use co-induction. -- Matthias
>> Sure, but how do you intuit the existence of that greatest fixed 
>> point?
>
> Thank you-- I think that's really my question. For example, we don't 
> expect a useful answer from this program:
>
>     data Thing = Leaf
>                | Node Thing
>
>     f :: Bool -> Thing -> Int
>     f _ (Node v) = i'
>         where i' = f (i' == 0) v
>     f isZero Leaf = if isZero then 1 else 0
>
> The boolean argument could be read as something like "will my result 
> be unequal to itself?"
>
> Dave

I don't understand your problem. _|_ can be a largest fp. -- Matthias




More information about the PRL mailing list