chiark / gitweb /
doc/concepts.tex: Typeset method rĂ´le names as identifiers.
[sod] / src / output-impl.lisp
index f668fef113141b94f8521fb7dc36c40d20e386cf..96cfa205a6cb3d9a18419690e266aede072964ad 100644 (file)
@@ -62,8 +62,20 @@ (defmethod add-sequencer-item-function ((sequencer sequencer) name function)
     (pushnew function (sequencer-item-functions item))))
 
 (defmethod invoke-sequencer-items ((sequencer sequencer) &rest arguments)
-  (dolist (item (merge-lists (reverse (sequencer-constraints sequencer))))
-    (dolist (function (reverse (sequencer-item-functions item)))
-      (apply function arguments))))
+  #+debug
+  (format *debug-io* "~@<;; ~@;Constraints: ~_~
+                     ~<~@{~<  * ~;~@{~S~^, ~:_~}~:>~:@_~}~:>~:>"
+         (mapcar (lambda (constraint)
+                   (mapcar #'sequencer-item-name constraint))
+                 (sequencer-constraints sequencer)))
+  (let ((seen (make-hash-table)))
+    (dolist (item (merge-lists (reverse (sequencer-constraints sequencer))))
+      (setf (gethash item seen) t)
+      (dolist (function (reverse (sequencer-item-functions item)))
+       (apply function arguments)))
+    (maphash (lambda (name item)
+              (unless (gethash item seen)
+                (warn "Unused output item ~S" name)))
+            (sequencer-table sequencer))))
 
 ;;;----- That's all, folks --------------------------------------------------