diff options
author | Thomas White <taw@physics.org> | 2021-03-28 22:36:26 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-03-31 21:56:36 +0200 |
commit | be86b2caebb40eb19bd29f2a01645af88ae86599 (patch) | |
tree | 1dd5959c254bc8ce74ab4aa51f2f5da280f5ebf7 /guile/starlet/base.scm | |
parent | 730bd4f092f36511533d384e57463c30f4e66519 (diff) |
Get rid of have-value
It seems clearer just to check explicitly.
Diffstat (limited to 'guile/starlet/base.scm')
-rw-r--r-- | guile/starlet/base.scm | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/guile/starlet/base.scm b/guile/starlet/base.scm index 1d4bfd6..4e47937 100644 --- a/guile/starlet/base.scm +++ b/guile/starlet/base.scm @@ -265,9 +265,6 @@ (get-state-hash-table state))) -(define (have-value val) - (not (eq? val 'no-value))) - (define (state-find fix attr state) (hash-ref (get-state-hash-table state) (cons fix attr) @@ -287,15 +284,15 @@ (let ((current-value (state-find fix attr combined-state))) - (if (have-value current-value) + (if (eq? 'no-value current-value) (set-in-state! combined-state fix attr - (merge-rule attr current-value value)) + value) (set-in-state! combined-state fix attr - value)))) + (merge-rule attr current-value value))))) new)) @@ -499,9 +496,9 @@ pre-existing contents." (atomic-box-ref state-list)) programmer-state)))) (let ((val (state-find fix attr-name combined-state))) - (if (have-value val) - (value->number val 0) - (get-attr-home-val fix attr-name))))) + (if (eq? 'no-value val) + (get-attr-home-val fix attr-name) + (value->number val 0))))) (define-syntax attr-continuous |