Skip to content

Instantly share code, notes, and snippets.

@jbclements
Created April 10, 2019 22:25
Show Gist options
  • Save jbclements/b811a228433a536da579667578de78c8 to your computer and use it in GitHub Desktop.
Save jbclements/b811a228433a536da579667578de78c8 to your computer and use it in GitHub Desktop.
our magnificent rear end
#lang racket
;; this file implements the awesome back end of the compiler
(provide serialize)
;; given an intermediate representation, serialize it to a file
(define (serialize ir)
(call-with-output-file "/tmp/zz.txt"
(λ (port)
(for ([stmt (in-list ir)])
(displayln stmt port)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment