Re: Compilation order when compiling and loading a file
- From: Maciej Katafiasz <mathrick@xxxxxxxxx>
- Date: Fri, 30 Nov 2007 14:15:41 +0000 (UTC)
Den Fri, 30 Nov 2007 05:47:32 -0800 skrev peter.hildebrandt@xxxxxxxxx:
I'd like to do the following within one file
- defun a helper function
- defmacro a macro which uses the helper function - use the macro
Just like this
-----------
(in-package :common-lisp-user)
(defun helper (p)
`(print ,p))
(defmacro my-macro (a)
(helper a))
(my-macro 'done)
------------
However, at the time my-macro is compiled, it complains about helper
being undefined. (In case it matters: This happens in SBCL 1.0.11 with
today's slime cvs)
Works perfectly fine for me (although it doesn't actually print anything
if you don't execute (load "helper.lisp") at REPL, but with --eval).
Cheers,
Maciej
.
- Follow-Ups:
- Re: Compilation order when compiling and loading a file
- From: Zach Beane
- Re: Compilation order when compiling and loading a file
- References:
- Compilation order when compiling and loading a file
- From: peter.hildebrandt@xxxxxxxxx
- Compilation order when compiling and loading a file
- Prev by Date: Re: Compilation order when compiling and loading a file
- Next by Date: Re: printing circular data structures
- Previous by thread: Re: Compilation order when compiling and loading a file
- Next by thread: Re: Compilation order when compiling and loading a file
- Index(es):
Relevant Pages
|
|