Simplify during*
This commit is contained in:
parent
2f4525b031
commit
b5c57381fa
|
@ -239,23 +239,14 @@
|
||||||
(entity #:name name
|
(entity #:name name
|
||||||
#:assert
|
#:assert
|
||||||
(lambda (value handle)
|
(lambda (value handle)
|
||||||
(let ((facet (react (facet-prevent-inert-check! this-facet)
|
(hash-set! assertion-map
|
||||||
(f value))))
|
handle
|
||||||
(match (hash-ref assertion-map handle #f)
|
(react (facet-prevent-inert-check! this-facet)
|
||||||
[#f
|
(f value))))
|
||||||
(hash-set! assertion-map handle facet)]
|
|
||||||
['dead
|
|
||||||
(hash-remove! assertion-map handle)
|
|
||||||
(stop-facet facet)]
|
|
||||||
[_
|
|
||||||
(error 'during "Duplicate assertion handle ~a" handle)])))
|
|
||||||
#:retract
|
#:retract
|
||||||
(lambda (handle)
|
(lambda (handle)
|
||||||
(match (hash-ref assertion-map handle #f)
|
(match (hash-ref assertion-map handle #f)
|
||||||
[#f
|
[#f (void)]
|
||||||
(hash-set! assertion-map handle 'dead)]
|
|
||||||
['dead
|
|
||||||
(error 'during "Duplicate retraction handle ~a" handle)]
|
|
||||||
[facet
|
[facet
|
||||||
(hash-remove! assertion-map handle)
|
(hash-remove! assertion-map handle)
|
||||||
(stop-facet facet)]))))
|
(stop-facet facet)]))))
|
||||||
|
|
Loading…
Reference in New Issue