aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-06-15 22:42:13 +0200
committerThomas White <taw@physics.org>2023-06-15 22:42:13 +0200
commitfd094d2fdcbc99493c7ad9420f4b38ec1cd4b825 (patch)
tree26032d08e5b97d4225841b08257fc15bf4240874
parentcc7f7c6a1557816f4b138a80132fbbc62b933a2e (diff)
Un-GOOPS some procedures
These don't need to be generic any more, now that we only have one type of attribute.
-rw-r--r--guile/starlet/engine.scm2
-rw-r--r--guile/starlet/fixture.scm11
-rw-r--r--guile/starlet/scanout.scm3
-rw-r--r--guile/starlet/state.scm4
4 files changed, 5 insertions, 15 deletions
diff --git a/guile/starlet/engine.scm b/guile/starlet/engine.scm
index c63cb9b..28f4321 100644
--- a/guile/starlet/engine.scm
+++ b/guile/starlet/engine.scm
@@ -125,7 +125,7 @@
(define name (patch-many-real (quote name) stuff ...)))))
-(define-method (current-value (fix <fixture>) (attr-name <starlet-attribute>))
+(define (current-value fix attr-name)
(let ((v (state-find fix attr-name (current-value-state))))
(if (eq? v 'no-value)
(get-attr-home-val fix attr-name)
diff --git a/guile/starlet/fixture.scm b/guile/starlet/fixture.scm
index 2711f9e..dfb5381 100644
--- a/guile/starlet/fixture.scm
+++ b/guile/starlet/fixture.scm
@@ -168,21 +168,14 @@
(is-a? f <fixture>))
-(define-method (find-attr (fix <fixture>) (attr-name <starlet-attribute>))
+(define (find-attr fix attr-name)
(find (lambda (a)
(eq? (get-attr-name a)
attr-name))
(get-fixture-attrs fix)))
-(define-method (find-attr fix attr-name)
- (raise-exception
- (make-exception
- (make-exception-with-message "Invalid parameters")
- (make-exception-with-irritants fix))))
-
-
-(define-method (get-attr-home-val (fix <fixture>) (attr <starlet-attribute>))
+(define (get-attr-home-val fix attr)
(let ((attr-obj (find-attr fix attr)))
(if attr-obj
(attr-home-value attr-obj)
diff --git a/guile/starlet/scanout.scm b/guile/starlet/scanout.scm
index df6245d..69f3e9c 100644
--- a/guile/starlet/scanout.scm
+++ b/guile/starlet/scanout.scm
@@ -25,7 +25,6 @@
#:use-module (starlet utils)
#:use-module (starlet attributes)
#:use-module (starlet guile-ola)
- #:use-module (oop goops)
#:use-module (ice-9 threads)
#:use-module (ice-9 atomic)
#:use-module (ice-9 exceptions)
@@ -44,7 +43,7 @@
(define current-scanout-state (make-parameter (make-empty-state)))
-(define-method (get-attr (attr-name <starlet-attribute>))
+(define (get-attr attr-name)
(let ((v (state-find (current-scanout-fixture)
attr-name
(current-scanout-state))))
diff --git a/guile/starlet/state.scm b/guile/starlet/state.scm
index a66c342..588e887 100644
--- a/guile/starlet/state.scm
+++ b/guile/starlet/state.scm
@@ -183,9 +183,7 @@
(atomic-box-ref (get-ht-box state))))
-(define-method (state-find (fix <fixture>)
- (attr <starlet-attribute>)
- (state <starlet-state>))
+(define (state-find fix attr state)
(hash-ref (atomic-box-ref (get-ht-box state))
(cons fix attr)
'no-value))