-
-
Save corpix/e8756eea24f49bde850b95b15588b87e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(require (for-syntax racket)) | |
(define-syntax (sample stx) | |
(syntax-case stx (file) | |
((_ (file path)) | |
(let ((file (syntax->datum #'path))) | |
(call-with-input-string | |
(file->string file) | |
(lambda (port) (read-syntax file port))))))) | |
(sample (file "./sample.rkt")) | |
; ./sample.rkt::2: say-hello: unbound identifier; | |
; also, no #%app syntax transformer is bound | |
; at: say-hello | |
; in: (say-hello) | |
; Source locations: | |
; ./sample.rkt:1:0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(say-hello) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment