I was recently working on an type inference algorithm and to test it I did the following: Used the quickcheck Arbitrary typeclass to generate expressions Inferred types of the expressions using my algorithm, converted the expressions that passed inference to haskell and wrote them to a file (without type signatures) converted and wrote the failed expression to a separate file compiled the "passed" file with -Wall, and extracted all the type signatures that were spit out as warnings parsed the type signatures that -Wall spit out and compare with the signatures generated by my algorithm. compiled the "failed" file and make sure I get type errors for all my expressions
My algorithm also infers infinite types (which haskell does not) so I had to test that functionality manually. Overall it was kinda messy, but it worked ok. I could possibly send you one of my lists. My test expressions are all very simple, no type classes, only 2 types (function and number), and the only expression components are let, lambda, apply, identifier, and number. If something like that would work, let me know. Hope that helps, - Job On Tue, Oct 20, 2009 at 10:07 AM, Peter Verswyvelen <bugf...@gmail.com>wrote: > For learning, I would like to develop my own implementation of type > inference, based on the paper "Typing Haskell in Haskell". > > At first sight, the source code of THIH contains a small number of > tests, but I was wandering if a large test set exist? > > Thanks, > Peter > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe >
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe