[Haskell-cafe] Refactoring recklessly

Joachim Breitner mail at joachim-breitner.de
Tue Dec 12 15:01:55 EST 2006


Hi,

Am Dienstag, den 12.12.2006, 11:24 -0800 schrieb Greg Fitzgerald:
> I'd like to be able to reorganize my code and then verify that I
> didn't change any functionality.  That is, the old and new code have
> precisely the same meaning.
> 
> Also, I'd like to be able to change a function and verify that
> efficiency was the only thing affected. 
> 
> Are either of these possible in Haskell or any language?

Yes, just create an
	instance (Eq a, Eq b) => Eq (a -> b)
then you can use == to compare your definitions.

Sorry, could not resist,
Joachim
-- 
Joachim Breitner
  e-Mail: mail at joachim-breitner.de
  Homepage: http://www.joachim-breitner.de
  ICQ#: 74513189


More information about the Haskell-Cafe mailing list