Wednesday, May 10, 2006

As I mentionedyesterday, Makefile.PL and a basic test file were added. But there were still something missing. I fixed the t/basic.t so that the test really passes. And the last two tests are corrected by updating the compile_p6grammar.pl to the one I used which deal with backslashes correctly.

On the another hand, I originally planned to support statements more than a single "return." But I dropped the idea due to two reasons:

I was not familiar enough to rules to write the grammar.

Translating general statements to Haskell is not straight forward.

But I implemented an alternative: temporary variables.

Assignment is not provided so variables can be translated to a simple "let ... in ..." expression, pure lambda one. The old yada example can now be written as