From f5920e78a4442f0e323561ddcca52700b0cfeae6 Mon Sep 17 00:00:00 2001
From: kilianmh <kilian.haemmerle@protonmail.com>
Date: Wed, 8 May 2024 03:08:04 +0200
Subject: [PATCH] Fix: Compiler note undefined type

Define error condition before usage.
---
 src/locatives/base.lisp | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/locatives/base.lisp b/src/locatives/base.lisp
index 8dc066b..0017d59 100644
--- a/src/locatives/base.lisp
+++ b/src/locatives/base.lisp
@@ -57,6 +57,18 @@
   calling 40ANTS-DOC/REFERENCE-API:CANONICAL-REFERENCE on it will return the same reference.
   For extension only, don't call this directly."))
 
+(define-condition locate-error (error)
+  ((message :initarg :message :reader locate-error-message)
+   (object :initarg :object :reader locate-error-object)
+   (locative :initarg :locative :reader locate-error-locative))
+  (:documentation "Signaled by LOCATE when the lookup fails and ERRORP
+  is true.")
+  (:report (lambda (condition stream)
+             (format stream "~@<Could not locate ~A ~A.~@[ ~A~]~:@>"
+                     (locate-error-locative condition)
+                     (locate-error-object condition)
+                     (locate-error-message condition)))))
+
 (defun locate-error (&rest format-and-args)
   "Call this function to signal a LOCATE-ERROR condition from a
   LOCATE-OBJECT generic-function. FORMAT-AND-ARGS contains a format string and
@@ -84,18 +96,6 @@
         (error 'locate-error :message (locate-error-message e)
                :object object :locative locative)))))
 
-(define-condition locate-error (error)
-  ((message :initarg :message :reader locate-error-message)
-   (object :initarg :object :reader locate-error-object)
-   (locative :initarg :locative :reader locate-error-locative))
-  (:documentation "Signaled by LOCATE when the lookup fails and ERRORP
-  is true.")
-  (:report (lambda (condition stream)
-             (format stream "~@<Could not locate ~A ~A.~@[ ~A~]~:@>"
-                     (locate-error-locative condition)
-                     (locate-error-object condition)
-                     (locate-error-message condition)))))
-
 
 (defgeneric locate-and-find-source (object locative-type locative-args)
   (:documentation