I was recently working on an type inference algorithm and to test it I did the following:<br> Used the quickcheck Arbitrary typeclass to generate expressions<br> Inferred types of the expressions using my algorithm, <br>
converted the expressions that passed inference to haskell and wrote them to a file (without type signatures)<br> converted and wrote the failed expression to a separate file<br> compiled the "passed" file with -Wall, and extracted all the type signatures that were spit out as warnings<br>
parsed the type signatures that -Wall spit out and compare with the signatures generated by my algorithm.<br> compiled the "failed" file and make sure I get type errors for all my expressions<br><br>My algorithm also infers infinite types (which haskell does not) so I had to test that functionality manually.<br>
<br>Overall it was kinda messy, but it worked ok.<br><br>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.<br>
<br>Hope that helps,<br><br>- Job<br><br><br><div class="gmail_quote">On Tue, Oct 20, 2009 at 10:07 AM, Peter Verswyvelen <span dir="ltr"><<a href="mailto:bugfact@gmail.com" target="_blank">bugfact@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
For learning, I would like to develop my own implementation of type<br>
inference, based on the paper "Typing Haskell in Haskell".<br>
<br>
At first sight, the source code of THIH contains a small number of<br>
tests, but I was wandering if a large test set exist?<br>
<br>
Thanks,<br>
Peter<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div><br>