Renamed call/debug from unstable/debug to debugf.
This commit is contained in:
parent
a915d7c053
commit
e7814b63a7
|
@ -47,7 +47,7 @@ don't depend on any other portion of the system
|
||||||
(when (and (warn-unreachable?)
|
(when (and (warn-unreachable?)
|
||||||
(log-level? l 'warning)
|
(log-level? l 'warning)
|
||||||
(and (syntax-transforming?) (syntax-original? (syntax-local-introduce e)))
|
(and (syntax-transforming?) (syntax-original? (syntax-local-introduce e)))
|
||||||
#;(and (orig-module-stx) (eq? (call/debug syntax-source-module e) (call/debug syntax-source-module (orig-module-stx))))
|
#;(and (orig-module-stx) (eq? (debugf syntax-source-module e) (debugf syntax-source-module (orig-module-stx))))
|
||||||
#;(syntax-source-module stx))
|
#;(syntax-source-module stx))
|
||||||
(log-message l 'warning (format "Typed Scheme has detected unreachable code: ~e" (syntax->datum (locate-stx e)))
|
(log-message l 'warning (format "Typed Scheme has detected unreachable code: ~e" (syntax->datum (locate-stx e)))
|
||||||
e))))
|
e))))
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
(provide debug
|
(provide debug
|
||||||
dprintf
|
dprintf
|
||||||
call/debug
|
debugf
|
||||||
begin/debug
|
begin/debug
|
||||||
define/debug
|
define/debug
|
||||||
define/private/debug
|
define/private/debug
|
||||||
|
@ -112,7 +112,7 @@
|
||||||
#:source (quote-srcloc #,stx)
|
#:source (quote-srcloc #,stx)
|
||||||
(begin (debug term) ...))]))
|
(begin (debug term) ...))]))
|
||||||
|
|
||||||
(define-syntax (call/debug stx)
|
(define-syntax (debugf stx)
|
||||||
|
|
||||||
(define-splicing-syntax-class argument
|
(define-splicing-syntax-class argument
|
||||||
#:attributes ([debugged 1])
|
#:attributes ([debugged 1])
|
||||||
|
@ -124,7 +124,7 @@
|
||||||
(syntax-parse stx
|
(syntax-parse stx
|
||||||
[(_ f:expr arg:argument ...)
|
[(_ f:expr arg:argument ...)
|
||||||
#`(debug
|
#`(debug
|
||||||
#:name 'call/debug
|
#:name 'debugf
|
||||||
#:source (quote-srcloc #,stx)
|
#:source (quote-srcloc #,stx)
|
||||||
(#%app (debug f) arg.debugged ... ...))]))
|
(#%app (debug f) arg.debugged ... ...))]))
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ Constructs a message in the same manner as @scheme[format] and writes it to
|
||||||
}
|
}
|
||||||
|
|
||||||
@defform/subs[
|
@defform/subs[
|
||||||
(call/debug function-expr argument ...)
|
(debugf function-expr argument ...)
|
||||||
([argument argument-expr (code:line argument-keyword argument-expr)])
|
([argument argument-expr (code:line argument-keyword argument-expr)])
|
||||||
]{
|
]{
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ Logs debugging information for @scheme[(#%app function-expr argument ...)],
|
||||||
including the evaluation and results of the function and each argument.
|
including the evaluation and results of the function and each argument.
|
||||||
|
|
||||||
@examples[#:eval (eval/require 'unstable/debug)
|
@examples[#:eval (eval/require 'unstable/debug)
|
||||||
(call/debug + 1 2 3)
|
(debugf + 1 2 3)
|
||||||
]
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user