[Haskell-cafe] Re: Control.Exception.evaluate - 'correct definition' not so correct

Abhay Parvate abhay.parvate at gmail.com
Thu May 8 02:16:16 EDT 2008


Thanks both for the the explanation and the link. The wikibook is really
growing fast!

Abhay

On Wed, May 7, 2008 at 5:05 PM, apfelmus <apfelmus at quantentunnel.de> wrote:

> Abhay Parvate wrote:
>
> > Just for curiocity, is there a practically useful computation that uses
> > 'seq' in an essential manner, i.e. apart from the efficiency reasons?
> >
>
> I don't think so because you can always replace  seq  with  const id .
> In fact, doing so will get you "more" results, i.e. a computation that
> did not terminate may do so now.
>
> In other words, we have
>
>  seq _|_ = _|_
>  seq x   = id    for  x > _|_
>
> but
>
>  (const id) _|_ = id
>  (const id) x   = id   for  x > _|_
>
> So, (const id) is always more defined (">") than  seq  .
>
>
> For more about _|_ and the semantic approximation order, see
>
>  http://en.wikibooks.org/wiki/Haskell/Denotational_semantics
>
>
>
> Regards,
> apfelmus
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080508/f5e79fe5/attachment.htm


More information about the Haskell-Cafe mailing list