Unit tests for GHC code?

2014-01-29 Thread Joachim Breitner
Hi, I am currently working on a piece of code (an analysis to solve #7994) where I’d like to make sure that my changes do not regress over what I had before. But I find it unnecessarily hard to write our usual test-case styles for them: * I’d like to test against very small Core that does

Re: Unit tests for GHC code?

2014-01-29 Thread Richard Eisenberg
Let me take a different slice at this question, inspired more by Joachim's subject line than his text: On a number of occasions I've wanted to write unit tests against a certain function or set of functions. The role inference algorithm is a prime example, but it's happened elsewhere, too. The

Re: Unit tests for GHC code?

2014-01-29 Thread Joachim Breitner
Hi, Am Mittwoch, den 29.01.2014, 10:12 -0500 schrieb Richard Eisenberg: So, is there a way / does someone know how to make a way to do proper unit testing? The ability to do such tests is treated as a key virtue of (pure) functional programming, and yet we don't do it! :) I’m now doing this: