Commit Graph

5 Commits

Author SHA1 Message Date
9981c222eb Added desugar phase for converting cond into a chain of if's 2025-12-28 21:04:45 +03:00
624d420afe Separated mutually recursive definition of desugar phases
They do not need to be mutually recursive at all. At first I thought
they would have to be, because I thought it would be best if each phase
completely desugared the bodies of the expressions they handle, but now
I see that would probably lead to an infinite loop.

There is simply no reason to couple them so tightly.
2025-12-28 21:04:45 +03:00
d80caadc85 Added gensym, and phases in the desugar module for logical and & or 2025-12-28 21:04:45 +03:00
be0d479665 Added desugar steps to add (begin) wrappers around long lambda bodies, and rewrite internal (define) forms into letrec forms 2025-12-28 21:04:45 +03:00
4f1ad54596 Started work on the compiler, with a desugar phase 2025-12-28 21:04:45 +03:00