|
|
@ -1,7 +1,7 @@
|
|
|
|
#lang racket/base
|
|
|
|
#lang racket/base
|
|
|
|
(require (for-syntax racket/base racket/syntax))
|
|
|
|
(require (for-syntax racket/base racket/syntax))
|
|
|
|
|
|
|
|
|
|
|
|
(provide report)
|
|
|
|
(provide report report*)
|
|
|
|
|
|
|
|
|
|
|
|
(define-syntax (report stx)
|
|
|
|
(define-syntax (report stx)
|
|
|
|
(syntax-case stx ()
|
|
|
|
(syntax-case stx ()
|
|
|
@ -9,4 +9,8 @@
|
|
|
|
[(_ expr name)
|
|
|
|
[(_ expr name)
|
|
|
|
#'(begin
|
|
|
|
#'(begin
|
|
|
|
(displayln (format "~a = ~v" 'name expr) (current-error-port))
|
|
|
|
(displayln (format "~a = ~v" 'name expr) (current-error-port))
|
|
|
|
expr)]))
|
|
|
|
expr)]))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define-syntax (report* stx)
|
|
|
|
|
|
|
|
(syntax-case stx ()
|
|
|
|
|
|
|
|
[(_ expr ...) (datum->syntax stx `(begin ,@(map (λ(arg) `(report ,arg)) (syntax->datum #'(expr ...)))))]))
|
|
|
|