Re: [Haskell-cafe] Deciding equality of functions.

2011-04-10 Thread Claus Reinke
It is a common situation when one has two implementations of the same function, one being straightforward but slow, and the other being fast but complex. It would be nice to be able to check if these two versions are equal to catch bugs in the more complex implementation. This common situatio

Re: [Haskell-cafe] Deciding equality of functions.

2011-04-10 Thread Patrick Browne
On 10/04/2011 04:22, wren ng thornton wrote: > The thing is that a lot of the common optimizations (e.g., TCO) > completely wreck the inductive structure of the function which, in turn, > makes it difficult to say interesting things about them.[1] Could you point me to some Haskell references conc

Re: [Haskell-cafe] Deciding equality of functions.

2011-04-09 Thread wren ng thornton
On 4/9/11 1:26 PM, Grigory Sarnitskiy wrote: I guess that deciding whether two functions are equal in most cases is algorithmically impossible. However maybe there exists quite a large domain of decidable cases? If so, how can I employ that in Haskell? It is a common situation when one has two

Re: [Haskell-cafe] Deciding equality of functions.

2011-04-09 Thread Luke Palmer
On Sat, Apr 9, 2011 at 11:26 AM, Grigory Sarnitskiy wrote: > I guess that deciding whether two functions are equal in most cases is > algorithmically impossible. However maybe there exists quite a large domain > of decidable cases? If so, how can I employ that in Haskell? > > It is a common situat

Re: [Haskell-cafe] Deciding equality of functions.

2011-04-09 Thread Edward Z. Yang
Excerpts from Grigory Sarnitskiy's message of Sat Apr 09 13:26:28 -0400 2011: > I guess that deciding whether two functions are equal in most cases is > algorithmically impossible. However maybe there exists quite a large domain > of decidable cases? If so, how can I employ that in Haskell? In the

Re: [Haskell-cafe] Deciding equality of functions.

2011-04-09 Thread Vo Minh Thu
2011/4/9 Grigory Sarnitskiy : > I guess that deciding whether two functions are equal in most cases is > algorithmically impossible. However maybe there exists quite a large domain > of decidable cases? If so, how can I employ that in Haskell? > > It is a common situation when one has two impleme

[Haskell-cafe] Deciding equality of functions.

2011-04-09 Thread Grigory Sarnitskiy
I guess that deciding whether two functions are equal in most cases is algorithmically impossible. However maybe there exists quite a large domain of decidable cases? If so, how can I employ that in Haskell? It is a common situation when one has two implementations of the same function, one bei