Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Lisp > acl compile-fil...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 11 Topic 12439 of 13149
Post > Topic >>

acl compile-file can't find a macro

by danb <sogwaldan@[EMAIL PROTECTED] > May 7, 2008 at 11:12 AM

I defined a macro (WHILE) before using it in the same file, but
ACL didn't seem to register its existence during compilation:

;;; Compiling file /usr/home/dan/progg/lib/cl/standard.lisp
Error: attempt to call `WHILE' which is an undefined function.
  [condition type: UNDEFINED-FUNCTION]

I just loaded the code into sbcl, and it runs fine.  The source file
(uploaded immediately after the error occured) is here:
http://www.prairienet.org/~dsb/mycode/cl/lib/standard.lisp

and the following *may* be all the relevant code, except acl didn't
say what line it errored on.  According to emacs (Ctrl-x < Ctrl-s),
the first occurance of WHILE is in the MACX form that defines it,
and the first call is in the definition of DEF.

(defmacro x****t (&rest symbols)
  `(eval-when (:load-toplevel :execute) (ex****t ',symbols)))

(defmacro macx (macro args &body body)
  `(progn
    (defmacro ,macro ,args ,@[EMAIL PROTECTED]
)
    (x****t ,macro)))

(macx while (test &body body) `(loop (unless ,test (return)) ,@[EMAIL PROTECTED]
))

(macx def (func args &body defn)
  (let (preamble (body defn))
    (when (listp body)
      (when (stringp (car body)) (push (pop body) preamble))
      (while (and (listp (car body))
		  (eq (caar body) 'declare)) (push (pop body) preamble)))
        ...

--Dan

------------------------------------------------
Dan Bensen  http://www.prairienet.org/~dsb/

cl-match:  expressive pattern matching in Lisp
http://common-lisp.net/project/cl-match/
 




 11 Posts in Topic:
acl compile-file can't find a macro
danb <sogwaldan@[EMAIL  2008-05-07 11:12:32 
Re: acl compile-file can't find a macro
karsten <karsten.poeck  2008-05-07 12:02:45 
Re: acl compile-file can't find a macro
Marco Antoniotti <marc  2008-05-07 12:32:42 
Re: acl compile-file can't find a macro
Willem Broekema <metaw  2008-05-07 13:51:33 
Re: acl compile-file can't find a macro
Paul Donnelly <paul-do  2008-05-07 18:55:57 
Re: acl compile-file can't find a macro
Kent M Pitman <pitman@  2008-05-07 22:33:22 
Re: acl compile-file can't find a macro
Paul Donnelly <paul-do  2008-05-08 00:08:20 
Re: acl compile-file can't find a macro
Kent M Pitman <pitman@  2008-05-08 04:12:23 
Re: acl compile-file can't find a macro
usenet1.3.CalRobert@[EMAI  2008-05-09 01:07:23 
HotMail/EgyptianUniversities spammer harvesting from this newsgr
usenet1.3.calrobert@[EMAI  2008-05-29 15:37:21 
Re: acl compile-file can't find a macro
danb <sogwaldan@[EMAIL  2008-05-09 11:50:26 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 23:24:37 CDT 2008.