[Haskell-cafe] Re: instance Eq (a -> b)

Ashley Yakeley ashley at semantic.org
Wed Apr 14 20:10:57 EDT 2010

On 2010-04-14 14:58, Ashley Yakeley wrote:
> On 2010-04-14 13:59, roconnor at theorem.ca wrote:
>> There is some notion of value, let's call it proper value, such that
>> bottom is not one.
>> In other words bottom is not a proper value.
>> Define a proper value to be a value x such that x == x.
>> So neither undefined nor (0.0/0.0) are proper values
>> In fact proper values are not just subsets of values but are also
>> quotients.
>> thus (-0.0) and 0.0 denote the same proper value even though they are
>> represented by different Haskell values.
> The trouble is, there are functions that can distinguish -0.0 and 0.0.
> Do we call them bad functions, or are the Eq instances for Float and
> Double broken?

Worse, this rules out values of types that are not Eq.

Ashley Yakeley

More information about the Haskell-Cafe mailing list