Skip to content

Instantly share code, notes, and snippets.

Created June 30, 2022 19:39
What would you like to do?
#lang racket
(require (for-meta 2 racket/base racket/file))
(define-syntax (define-compile-time-bytes stx)
(syntax-case stx ()
[(_ id f)
(define-syntax (gen _)
(datum->syntax #'here (file->bytes f))))
(define-syntax (id stx)
#`(quote #,(gen))))]))
(define-compile-time-bytes x "/tmp/compile-time.rkt")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment