Commit 9c762a14845679db450fc53b7ca86ff3e5a07719

Thomas de Grivel 2015-09-23T06:28:03

List-operations as generic.

diff --git a/core/defs.lisp b/core/defs.lisp
index b171b7c..f0555eb 100644
--- a/core/defs.lisp
+++ b/core/defs.lisp
@@ -224,6 +224,7 @@
 ;;  Operating on resources
 
 (defgeneric find-operation (resource property os))
+(defgeneric list-operations (resource plist os))
 (defgeneric operate (resource plist))
 
 (define-condition resource-operation-error (error)
diff --git a/core/operation.lisp b/core/operation.lisp
index c71f5d4..92fd6b8 100644
--- a/core/operation.lisp
+++ b/core/operation.lisp
@@ -69,7 +69,7 @@
                 op))))
         (operations-of r)))
 
-(defun list-operations (res plist os)
+(defmethod list-operations (res plist os)
   (iter (for* (property value) in plist)
         (adjoining (or (find-operation res property os)
                        (error 'resource-operation-not-found