Renamed bindings from unstable/hash and unstable/debug that will clash
with subsequent adaptation of (planet cce/scheme) to collects/unstable. These bindings are temporary, and will be replaced in the adaptation.
This commit is contained in:
parent
c1906fd3d3
commit
e52fb81aac
|
@ -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))
|
||||
|
|
|
@ -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)))))
|
||||
|
|
|
@ -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))))
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)]
|
||||
|
|
|
@ -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)
|
||||
]
|
||||
}
|
||||
|
|
|
@ -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))
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user