On Sat, Jun 11, 2011 at 10:06 AM, Sean Perry <[email protected]> wrote:

> Choices, choices.
>
> The first one is to use unit tests. Look at the grammar and make sure the
> obvious stuff fails or succeeds. "a + b", "a :+ b", etc. You can do this at
> the Haskell level with parser objects.
>
> Next you can write small samples to test things the unit tests did not.
> Compare the output to known results. There are numerous examples of this in
> the open source world you can either reuse or crib from.
>

Don't just test the "obvious" things.   If the parse tree is truly a tree,
it is an initial algebra and amenable to case analysis as an initial
algebra.  In other words, you can do a proof by induction, just by checking
all the base cases.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to