This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
order of macro expansion
- From: "Max Kirillov" <max at max630 dot net>
- To: kawa at sourceware dot org
- Date: Tue, 28 Feb 2012 01:30:34 -0700
- Subject: order of macro expansion
Hello.
I would like to know if there is a way to manage (or at least predict)
macros expansion. For example, I have the following code:
---------------
; this expands to a sequence of "define-alias" calls
(imports
....
("android.graphics" (Bitmap Paint Canvas)))
; if I comment out this declaration, compilation fails complaining about
unknown
; the "imports" above will result the same, and it works for other
usages
(define-alias Bitmap <android.graphics.Bitmap>)
(define-simple-class TestActivity (Activity) class-name:
"net.max630.android.test.TestActivity"
....
(bitmap1 :: Bitmap)
(bitmap2 :: Bitmap)
)
---------------
Here, the aliased in macro classes are not visible in field
declarations. I suppose this happens because it compiles
"define-simple-class" before fully expanding "imports". I could also
remember several other cases where I had similar problems.
Thanks,
--
Max