diff --git a/collects/typed-scheme/infer/constraints.rkt b/collects/typed-scheme/infer/constraints.rkt index d49691976c..e87137c0d7 100644 --- a/collects/typed-scheme/infer/constraints.rkt +++ b/collects/typed-scheme/infer/constraints.rkt @@ -75,7 +75,7 @@ [(map2 dmap2) (in-pairs maps2)]) (with-handlers ([exn:infer? (lambda (_) #f)]) (cons - (hash-union map1 map2 (lambda (k v1 v2) (c-meet v1 v2))) + (simple-hash-union map1 map2 (lambda (k v1 v2) (c-meet v1 v2))) (dmap-meet dmap1 dmap2)))))]) (when (null? maps) (fail! maps1 maps2)) diff --git a/collects/typed-scheme/infer/dmap.rkt b/collects/typed-scheme/infer/dmap.rkt index c8857c91be..1735c49ca0 100644 --- a/collects/typed-scheme/infer/dmap.rkt +++ b/collects/typed-scheme/infer/dmap.rkt @@ -62,5 +62,5 @@ (define (dmap-meet dm1 dm2) (make-dmap - (hash-union (dmap-map dm1) (dmap-map dm2) - (lambda (k dc1 dc2) (dcon-meet dc1 dc2))))) + (simple-hash-union (dmap-map dm1) (dmap-map dm2) + (lambda (k dc1 dc2) (dcon-meet dc1 dc2))))) diff --git a/collects/typed-scheme/utils/tc-utils.rkt b/collects/typed-scheme/utils/tc-utils.rkt index cc8cc926e9..cea0944159 100644 --- a/collects/typed-scheme/utils/tc-utils.rkt +++ b/collects/typed-scheme/utils/tc-utils.rkt @@ -47,7 +47,7 @@ don't depend on any other portion of the system (when (and (warn-unreachable?) (log-level? l 'warning) (and (syntax-transforming?) (syntax-original? (syntax-local-introduce e))) - #;(and (orig-module-stx) (eq? (debug syntax-source-module e) (debug syntax-source-module (orig-module-stx)))) + #;(and (orig-module-stx) (eq? (debug/call syntax-source-module e) (debug/call syntax-source-module (orig-module-stx)))) #;(syntax-source-module stx)) (log-message l 'warning (format "Typed Scheme has detected unreachable code: ~e" (syntax->datum (locate-stx e))) e)))) diff --git a/collects/unstable/debug.rkt b/collects/unstable/debug.rkt index fdc0fffec1..ccaa887f92 100644 --- a/collects/unstable/debug.rkt +++ b/collects/unstable/debug.rkt @@ -1,6 +1,9 @@ #lang racket/base -(provide debug debugm) +(provide + (rename-out + [debug debug/call] + [debugm debug/macro])) ;; printf debugging convenience (define-syntax debug diff --git a/collects/unstable/hash.rkt b/collects/unstable/hash.rkt index 5d622a3014..82aa9506c0 100644 --- a/collects/unstable/hash.rkt +++ b/collects/unstable/hash.rkt @@ -1,9 +1,9 @@ #lang racket/base -(provide hash-union) +(provide simple-hash-union) ;; map map (key val val -> val) -> map -(define (hash-union h1 h2 f) +(define (simple-hash-union h1 h2 f) (for/fold ([h* h1]) ([(k v2) h2]) (let* ([v1 (hash-ref h1 k #f)] diff --git a/collects/unstable/scribblings/debug.scrbl b/collects/unstable/scribblings/debug.scrbl index 6497001454..6a8028a4cd 100644 --- a/collects/unstable/scribblings/debug.scrbl +++ b/collects/unstable/scribblings/debug.scrbl @@ -15,21 +15,21 @@ @unstable-header[] -@defform*[[(debug (f args ...)) - (debug f args ...)]]{ +@defform*[[(debug/call (f args ...)) + (debug/call f args ...)]]{ Produce debugging output for the application of @racket[f], including the values of @racket[args]. @examples[#:eval the-eval -(debug (+ 3 4 (* 5 6))) -(debug + 1 2 3) +(debug/call (+ 3 4 (* 5 6))) +(debug/call + 1 2 3) ] } -@defform*[[(debugm f args ...)]]{ +@defform*[[(debug/macro f args ...)]]{ Produce debugging output for the application of @racket[f], but does not parse or print args. Suitable for use debugging macros. @examples[#:eval the-eval -(debugm match (list 1 2 3) +(debug/macro match (list 1 2 3) [(list x y z) (+ x y z)]) -(debugm + 1 2 3) +(debug/macro + 1 2 3) ] } diff --git a/collects/unstable/scribblings/hash.scrbl b/collects/unstable/scribblings/hash.scrbl index 05e01713b6..ae24750c79 100644 --- a/collects/unstable/scribblings/hash.scrbl +++ b/collects/unstable/scribblings/hash.scrbl @@ -16,7 +16,7 @@ @unstable[@author+email["Sam Tobin-Hochstadt" "samth@ccs.neu.edu"]] -@defproc[(hash-union [t1 hash?] [t2 hash?] [combine (any/c any/c any/c . -> . any/c)]) hash?]{ +@defproc[(simple-hash-union [t1 hash?] [t2 hash?] [combine (any/c any/c any/c . -> . any/c)]) hash?]{ Produces the combination of @racket[t1] and @racket[t2]. If either @racket[t1] or @racket[t2] has a value for key @racket[k], then the result has the same value for @racket[k]. If both @racket[t1] and @@ -24,7 +24,7 @@ result has the same value for @racket[k]. If both @racket[t1] and @racket[(combine k (hash-ref t1 k) (hash-ref t2 k))] for @racket[k]. @examples[#:eval the-eval -(hash-union #hash((a . 5) (b . 0)) #hash((d . 12) (c . 1)) (lambda (k v1 v2) v1)) -(hash-union #hash((a . 5) (b . 0)) #hash((a . 12) (c . 1)) (lambda (k v1 v2) v1)) +(simple-hash-union #hash((a . 5) (b . 0)) #hash((d . 12) (c . 1)) (lambda (k v1 v2) v1)) +(simple-hash-union #hash((a . 5) (b . 0)) #hash((a . 12) (c . 1)) (lambda (k v1 v2) v1)) ] -} \ No newline at end of file +}