summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ccwl/ccwl.scm12
1 files changed, 12 insertions, 0 deletions
diff --git a/ccwl/ccwl.scm b/ccwl/ccwl.scm
index 558161c..b106c6d 100644
--- a/ccwl/ccwl.scm
+++ b/ccwl/ccwl.scm
@@ -695,6 +695,18 @@ represented by <step> objects."
                                                      (syntax->datum value)
                                                      input-key-symbols))))))
                  (pairify #'(args ...)))
+       ;; Test for arguments that have been supplied more than once.
+       (fold (match-lambda*
+               (((key-syntax . _) seen)
+                (let ((key (syntax->datum key-syntax)))
+                  (when (memq key seen)
+                    (raise-exception
+                     (condition (ccwl-violation key-syntax)
+                                (formatted-message "~a argument already supplied"
+                                                   key))))
+                  (cons key seen))))
+             (list)
+             (pairify #'(args ...)))
        (let ((symbolic-arguments
               literal-arguments
               (partition (match-lambda