Add disappeared-use properties for struct ids.
Fix bug with handling of identifier as second arg to `define-match-expander' svn: r16201
This commit is contained in:
parent
224a9546b8
commit
65d804d286
|
@ -1,5 +1,4 @@
|
||||||
|
#lang scheme/base
|
||||||
(module match scheme/base
|
|
||||||
(require scheme/match/match
|
(require scheme/match/match
|
||||||
(for-syntax scheme/base))
|
(for-syntax scheme/base))
|
||||||
(provide (except-out (all-from-out scheme/match/match)
|
(provide (except-out (all-from-out scheme/match/match)
|
||||||
|
@ -18,5 +17,5 @@
|
||||||
[(_ id expr expr2) (define-match-expander id
|
[(_ id expr expr2) (define-match-expander id
|
||||||
expr
|
expr
|
||||||
no-old-match-form
|
no-old-match-form
|
||||||
expr2)])))
|
(#%expression expr2))]))
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,12 @@
|
||||||
[acc (cond [(null? acc) acc]
|
[acc (cond [(null? acc) acc]
|
||||||
[(not (car acc)) (cdr acc)]
|
[(not (car acc)) (cdr acc)]
|
||||||
[else acc])])
|
[else acc])])
|
||||||
(make-Struct id pred (get-lineage (cert struct-name)) acc
|
(make-Struct id
|
||||||
|
(syntax-property
|
||||||
|
pred
|
||||||
|
'disappeared-use (list struct-name))
|
||||||
|
(get-lineage (cert struct-name))
|
||||||
|
acc
|
||||||
(cond [(eq? '_ (syntax-e pats))
|
(cond [(eq? '_ (syntax-e pats))
|
||||||
(map make-Dummy acc)]
|
(map make-Dummy acc)]
|
||||||
[(syntax->list pats)
|
[(syntax->list pats)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user