|
@@ -108,7 +108,15 @@ Note that ~eqal~ will handle ~type-error~ by trying to switch the order of the a
|
|
|
(defgeneric substitute-expression (replace replacement expression))
|
|
|
|
|
|
@export
|
|
|
- (defgeneric evaluate (expression &key substitutions-list resolve-constants-light-p resolve-constants-hard-p))
|
|
|
+ (defgeneric evaluate (expression substitutions-list &key resolve-constants-light-p resolve-constants-hard-p))
|
|
|
+
|
|
|
+ (defmethod evaluate :around (expression substitutions-list &key resolve-constants-light-p resolve-constants-hard-p)
|
|
|
+ (if (and (or resolve-constants-light-p
|
|
|
+ resolve-constants-hard-p)
|
|
|
+ (not (and resolve-constants-light-p
|
|
|
+ resolve-constants-hard-p)))
|
|
|
+ (call-next-method)
|
|
|
+ (error "Only one of `resolve-constants-light-p' and `resolve-constants-hard-p' may be selected.")))
|
|
|
|
|
|
@export
|
|
|
(defgeneric to-sexp (expression &optional resolve-constants-p))
|