diff --git a/doc/dev-how-to.md b/doc/dev-how-to.md index 802b8e04..9cb39848 100644 --- a/doc/dev-how-to.md +++ b/doc/dev-how-to.md @@ -106,11 +106,11 @@ alternative implementations of `matmul`. We can do this by "defining MAGICL-compatible behavior" on the generic function, like so: ``` -(define-compatible-no-applicable-method-behavior matmul-lisp) (defgeneric matmul-lisp (a b) (:method ((a matrix) (b matrix)) ; ... )) +(define-compatible-no-applicable-method-behavior matmul-lisp) ``` Without the `define-compat...` line, a failure to find the method will @@ -131,11 +131,11 @@ If we wanted to accelerate `matmul` with BLAS, we could implement `matmul` in the BLAS extension. There, we might write: ``` -(magicl:define-compatible-no-applicable-method-behavior matmul-blas) (defgeneric matmul-blas (a b) (:method ((a matrix/double-float) (b matrix/double-float)) ;; ... )) +(magicl:define-compatible-no-applicable-method-behavior matmul-blas) (magicl:define-backend-implementation magicl:matmul :blas 'matmul-blas) ``` diff --git a/src/backend-function.lisp b/src/backend-function.lisp index 3369e539..29a18015 100644 --- a/src/backend-function.lisp +++ b/src/backend-function.lisp @@ -84,7 +84,7 @@ Without using this, a backend function may error if no method is found." ,@(loop :for name :in generic-function-names :collect - `(defmethod cl:no-applicable-method ((gf (eql ',name)) &rest args) + `(defmethod cl:no-applicable-method ((gf (eql #',name)) &rest args) (declare (ignore args)) (no-applicable-implementation ',name))))) diff --git a/src/high-level/util.lisp b/src/high-level/util.lisp index 45289b5d..9defd3c8 100644 --- a/src/high-level/util.lisp +++ b/src/high-level/util.lisp @@ -106,6 +106,6 @@ ,@(unless (magicl.backends:backend-function-p fun-name) (list `(define-backend-function ,fun-name ,lambda-list ,@(if doc-string (list doc-string))))) - (define-compatible-no-applicable-method-behavior ,fun-name-backend) (defgeneric ,fun-name-backend ,lambda-list ,@options) + (define-compatible-no-applicable-method-behavior ,fun-name-backend) (define-backend-implementation ,fun-name ,backend ',fun-name-backend))))