[Haskell-cafe] Re: evaluate vs seq

Michael Shulman viritrilbia at gmail.com
Tue Sep 12 13:20:02 EDT 2006

On 9/11/06, apfelmus at quantentunnel.de <apfelmus at quantentunnel.de> wrote:
> > * (a `seq` return a) = evaluate a *right now*, then produce an IO action
> >  which, when executed, returns the result of evaluating a.  Thus, if
> >  a is undefined, throws an exception right now.
> is a bit misleading as there is no evaluation "right now". It's better
> to say that (a `seq` return a) is _|_ ("bottom", i.e. undefined) when a
> == _|_.

Sure... but what about when a is not _|_?  I would also like to
understand the difference between `seq' and `evaluate' for arguments
that are defined.  How would you describe that without talking about
"when" expressions are evaluated?

> For a more detailed semantics of exceptions in Haskell, see
>    " Tackling the awkward squad: monadic input/output, concurrency,
> exceptions, and foreign-language calls in Haskell"
>    http://research.microsoft.com/%7Esimonpj/Papers/marktoberdorf/

Thanks; I will take a look at it!


More information about the Haskell-Cafe mailing list