diff --git a/experiment.rkt b/experiment.rkt new file mode 100644 index 0000000..02b8b47 --- /dev/null +++ b/experiment.rkt @@ -0,0 +1,20 @@ +#lang racket/base +(require compiler/decompile + compiler/zo-parse) + +;; A little bit of code to see how Racket really compiles code. + +(require scheme/pretty) + +(provide try) + +(define (try e) + (let ([out (open-output-bytes)]) + (write (parameterize ([current-namespace (make-base-namespace)]) + (compile e)) + out) + (let ([inp (open-input-bytes (get-output-bytes out))]) + + (pretty-print + (zo-parse inp))))) +