[Haskell-cafe] Re: (flawed?) benchmark : sort
ahey at iee.org
Mon Mar 10 12:19:07 EDT 2008
Denis Bueno wrote:
> On Mon, Mar 10, 2008 at 10:10 AM, Adrian Hey <ahey at iee.org> wrote:
>> >> The Eq instance you've given violates the law that (x == y) = True
>> >> implies x = y. Of course the Haskell standard doesn't specify this law,
>> >> but it should.
> Unless I'm missing something obvious, the example Neil gave earlier
> should make it clear how impossible this requirement is:
> What if I had made the definition of Foo:
> data Foo = Foo Int (Int -> Int)
> There is no way in general to decide the observational equivalence of
> two values of this data type (by reduction to the halting problem).
> Therefore it is impossible to write any function implementing such an
> equality test.
Did you read my original response to this example?
More information about the Haskell-Cafe