[Haskell-cafe] Re: philosophy of Haskell

Dan Doel dan.doel at gmail.com
Wed Aug 18 16:30:24 EDT 2010

On Wednesday 18 August 2010 2:50:00 pm Gregory Crosswhite wrote:
>  On 08/18/10 11:30, Dan Doel wrote:
> > Now, moving to the two loops:
> >   loop = loop
> >   loop' = \w0 -> let (w1, ()) = putStr "c" w0 in loop' w1
> > 
> > How are we to distinguish between these? I know of exactly one Haskell
> > function that can do so: seq. And this is only because it can distinguish
> > bottom from const bottom. Extensionally, these are equal functions.
> No, the very fact that one is bottom and the other is const bottom
> demonstrates that they are *not* equal.
> I wouldn't say that they are equal at all.  They are *extensionally*
> equal, but they aren't equal.

This distinction is unimportant to the topic being discussed here, though. 
Rewriting loop to be:

  loop w = loop w

makes it non-bottom, for instance. The fact that seq can distinguish the 
original loop from loop' does zero work toward explaining why the one is 
different from the other from the perspective of the effects represented.

-- Dan

More information about the Haskell-Cafe mailing list