chrisdone/fay — pull request #39 by bergmark (2012-07-31 14:20:33+00:00)
Title: implementation of guards

Here's my attempt at #27. Is it a good start?

It compiles guards into ternary ifs.
If there isn't an `otherwise` present there will be a final alternative that is `throw "Non-exhaustive guards"`. Any conventions on run time errors? I suppose it should at least be `throw new Error()` to produce a stack trace.

I have not matched
(GuardedRhs _ [] _)
(GuardedRhs _ ((Generator _ _ _) : _) _)
(GuardedRhs _ ((LetStmt _) : _) _)
(GuardedRhs _ ((RecStmt _) : _) _)
are all these possible?