X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/7702b7bc88a97c15f955f62e8afbc40521ceec7b..a4c0734b7ecd9c7792d7feef8c6b8af3983cfe6d:/src/pset-proto.lisp diff --git a/src/pset-proto.lisp b/src/pset-proto.lisp index 764350a..f03ec51 100644 --- a/src/pset-proto.lisp +++ b/src/pset-proto.lisp @@ -66,14 +66,8 @@ (export 'decode-property) (defgeneric decode-property (raw) (:documentation "Decode a RAW value into a TYPE, VALUE pair.") - (:method ((raw symbol)) (values :symbol raw)) - (:method ((raw integer)) (values :int raw)) - (:method ((raw string)) (values :string raw)) - (:method ((raw character)) (values :char raw)) (:method ((raw property)) (values (p-type raw) (p-value raw))) - (:method ((raw cons)) (values (car raw) (cdr raw))) - (:method ((raw function)) (values :func raw)) - (:method ((raw c-type)) (values :type raw))) + (:method ((raw cons)) (values (car raw) (cdr raw)))) (export 'make-property) (defun make-property (name raw-value &key type location seenp) @@ -99,9 +93,10 @@ ;; say it didn't work. (:method (value type wanted) (if (eql type wanted) value - (error "Incorrect type: expected ~A but found ~A" wanted type))) + (error "Incorrect type: expected ~(~A~) but found ~(~A~)" + wanted type))) - ;; If the caller asks for type T then give him the raw thing. + ;; If the caller asks for type T then give them the raw thing. (:method (value type (wanted (eql t))) (declare (ignore type)) value))