quote expr in unnamed time macro

The time was still reported correctly, but took longer and had the wrong name.
Fixes issue #288.
This commit is contained in:
Alex Shinn 2015-11-02 22:44:48 +09:00
parent 344680f3b2
commit fdc0396962

View file

@ -39,6 +39,6 @@
(define-syntax time (define-syntax time
(syntax-rules () (syntax-rules ()
((time expr) ((time expr)
(time (call-with-output-string (lambda (out) (write expr out))) expr)) (time (call-with-output-string (lambda (out) (write 'expr out))) expr))
((time name expr) ((time name expr)
(time* name (lambda () expr))))))) (time* name (lambda () expr)))))))