[Ecls-list] Method specialization error

Greg Pfeil pfeil at amazon.com
Tue Jan 10 12:15:02 UTC 2006


I'm trying to build Metatilities (used by CL-Containers) on the latest ECL,
and I get an error when it tries to compile this (from l0-clos.lisp):

    (defgeneric samep (thing-1 thing-2)
      (:documentation "Compares two things and returns true if they are the
    same in the sense of being interchangable. Implementations use the
    special variable *samep-tolerance* to specify how close two things need
    to be in order to be 'the same'. See nearly-samep too.")
      (:method (thing-1 thing-2)
               (funcall *samep-test* thing-1 thing-2))
      (:method ((thing-1 fixnum) (thing-2 fixnum))
               (= thing-1 thing-2))
      (:method ((thing-1 number) (thing-2 number))
               (= thing-1 thing-2))
      (:method ((thing-1 real) (thing-2 real))
               (nearly-equal-p thing-1 thing-2 *samep-tolerance*)))

The error is:

    No class named FIXNUM.
       [Condition of type SIMPLE-ERROR]

Of course, specialization can happen on any type, not just classes, so I
don't see why ECL complains. I haven't tried using this package in ECL
before.

Does anyone else see similar behavior?





More information about the ecl-devel mailing list