Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save michaelballantyne/1a28f20b7fc4297969a88ffb16af1ef0 to your computer and use it in GitHub Desktop.
Save michaelballantyne/1a28f20b7fc4297969a88ffb16af1ef0 to your computer and use it in GitHub Desktop.
#lang racket
(require
'#%expobs
syntax/modcode)
(define (expand/observe stx)
(parameterize ([current-expand-observe (lambda (x y)
(when #t
(writeln y)))])
(expand-syntax stx)))
(define rel-path (vector-ref (current-command-line-arguments) 0))
(expand/observe
(get-module-code
(build-path (current-directory) rel-path)
#:choose (lambda _ 'src)
#:compile (lambda (stx) stx)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment