David Roundy <[EMAIL PROTECTED]> wrote: > hello, > well that's because haskell is not as pure as it claims to be :-)
Nonsense. Haskell is perfectly pure; the IO monad is just nondeterministic :) > if every monad supports errors depends on what you mean by "supporting > errors". I mean `supporting errors' in the only possible sense that `supporting errors' can be implied by the existence of `fail': we have a throw function. > i would argue that supporting errors and divergence is not the same > thing. I never said it was. > the difference is that one should be able to handle an error thrown by > a computation, Although this doesn't imply the existence of a `catch' HOF; see the MonadPlus instance for Maybe. > while clearly we cannot detect nonterminating computations. Of course. But we can detect exceptions thrown by `error'. Even though we can't distinguish them from non-termination /in pure Haskell/. We can of course distinguish them in the IO monad (which perhaps ought to be re-named the SinBin monad, to be more honest...). So we can detect erroneous computations in any monad. Jon Cast _______________________________________________ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe
