[Haskell-cafe] Re: Proving stuff about IORefs

Ben Millwood haskell at benmachine.co.uk
Sun Oct 17 07:49:28 EDT 2010


On Sun, Oct 17, 2010 at 11:15 AM, Malcolm Wallace
<malcolm.wallace at me.com> wrote:
>
> The problem with the code you originally posted was that it looked like
> this:
>
>  f r = do r' <- something
>           f r'
>           something else -- this is dead code
>
> That is, the computation is non-terminating, because f simply calls itself
> recursively, with no base case.
>
> Regards,
>    Malcolm

He was using ==, not =, it was a statement of equality not a definition :)

Much like one might say that sort xs == sort (reverse xs).


More information about the Haskell-Cafe mailing list