Short answer: Yes, it does.
Long answer:
You wrote:
(defmethod some-fn ((num (eql "A")) (print "a specifict string"))) => doesn't compile
This is because you received the wrong syntax . It should be:
(defmethod some-fn ((num (eql "A"))) (print "a specific string")) => does compile
Usually formatted as:
(defmethod some-fn ((num (eql "A"))) (print "a specifict string"))
If you format it this way and use the indent tool of your favorite editor, you will see that the indentation does not look right for your code:
(defmethod some-fn ((num (eql "A")) (print "a specifict string")))
It may also help to try to understand the error message shown by the compiler.
Back to the topic:
You can use strings like any other Lisp object to send EQL to CLOS.
There are simply many possible lines that look like "A", and EQL is compared for identification (with the exception for numbers and characters). EQL does not compare strings by its characters.
Usually (EQL "A" "A") returns NIL. (Lateral note: in fact, in the code compiled by the compiler, this expression could theoretically be T. Since the compiler is allowed to reuse data objects to save space in the compiled code. Here we have literals, data objects.)
If you type on the command line
(some-fn "A")
It does not initiate EQL submission.
But this works as expected:
(defparameter *a-string* "A") (defmethod some-fn ((num (eql *a-string*))) (print "a specific string")))
and then
(some-fn *a-string*)
You need to make sure the variable matters. The variable is evaluated when the macro decomposition of the DEFMETHOD form is computed. Then the value is the object that is used to send EQL.
As Dirk said in his answer, you can use characters. The purpose of characters is that (EQL '| A |' | A |) is usually T. Characters are created by EQ during the reading process.
Summary:
Sending EQL row by row works in CLOS. For practical use, you need to call the function with the same, from the point of view of EQL, string.