coalton-codegen expands Coalton forms into generated Lisp for inspection.
Syntax
(coalton-codegen
⟨toplevel-form⟩ ...)
Semantics
- It accepts the same kind of body you would give to
coalton-toplevel. - The expansion returns generated Lisp code without host Lisp type declarations.
- Use it when debugging, especially when something is behaving unexpectedly.
Example
(coalton-codegen
(define (double x)
(+ x x)))