summaryrefslogtreecommitdiffabout
path: root/scm/verbop.scm
Side-by-side diff
Diffstat (limited to 'scm/verbop.scm') (more/less context) (show whitespace changes)
-rw-r--r--scm/verbop.scm16
1 files changed, 13 insertions, 3 deletions
diff --git a/scm/verbop.scm b/scm/verbop.scm
index 0fff38f..8308d70 100644
--- a/scm/verbop.scm
+++ b/scm/verbop.scm
@@ -130,10 +130,18 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (command-line))" "$@"
ret))
(define (conjugation-set key val)
+ (let ((elt (cond
+ ((not (eq? key #:root))
+ (cons key val))
+ ((and conjugation (assoc (car val) conjugation)) =>
+ (lambda (entry)
+ (set-cdr! entry (cons (cdr val) (cdr entry)))))
+ (else
+ (cons key (list val))))))
(set! conjugation
(if conjugation
- (append conjugation (list (cons key val)))
- (list (cons key val)))))
+ (append conjugation (list elt))
+ (list elt)))))
;;; Verb structure:
@@ -222,7 +230,8 @@ VALUES (~Q,~Q,~Q,~Q,~Q)"
(define (flush-mood mood vstr)
(if (eq? (car mood) #:root)
- (let ((val (cdr mood)))
+ (for-each
+ (lambda (val)
(ellinika:sql-query
"INSERT INTO irregular_root (verb,voice,thema,root) \
VALUES (~Q,~Q,~Q,~Q)"
@@ -230,6 +239,7 @@ VALUES (~Q,~Q,~Q,~Q)"
vstr
(car val)
(cdr val)))
+ (cdr mood))
(let ((mood-str (car mood)))
(let ((lst (cdr mood)))
(cond

Return to:

Send suggestions and report system problems to the System administrator.