On Tue, 28 Sep 1999, S. Alexander Jacobson wrote:
> My simple point is that claims about the correctness or incorrectness of
> the behavior of a function are incoherent outside the function's domain;
> that, as an language implementation matter, it is handy to make _|_ a
> member of all types is irrelevant.
>
> Haskell's (&&) only models the logical AND when it is passed booleans.
> To say that _|_ is a Haskell Boolean, is to create another concept domain
> (Haskell Boolean), which shares many properties with Logic Boolean but is
> not identical with it.
>
Exactly! And this domain which you call (Haskell Booleans) is in haskell
called 'Bool'. By the way, when we speak about functions in this forum, I
think most people are referring to *haskell* functions as opposed to
functions in math (or logic).
By the way, the domain of (not) and the codomain of (&&) in haskell is:
False True
\ /
_|_
> Understood in this manner, I don't think Parallel Haskell implementations
> need to make any promises about the sanity of the behvaior of functions
> when passed _|_.
If the semantics of the operation changes, then you'd have to give it
another name, or else it is not an implementation of haskell. As I see it
it's as simple as that. I don't really understand what you're getting at.
> As a practical matter, it would be nice if
> program success/failure was consistent accross Haskell implementations,
> but this does not require that functions behave in any particularly sane
> manner when passed _|_, only that they behave consistently.
>
> -Alex-
>
> PS Charity claims to eliminate _|_. I don't know enough about category
> theory and programming language design to know the costs of doing so.
>
For one thing, general recursion is out. That seems to mee to be a very
big cost, but I have not tried it in practice.
> ___________________________________________________________________
> S. Alexander Jacobson Shop.Com
> 1-212-697-0184 voice The Easiest Way To Shop
>
>
/Lars L