This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
misunderstanding define-constant?
- From: "Hoehle, Joerg-Cyril" <Joerg-Cyril dot Hoehle at t-systems dot com>
- To: kawa at sources dot redhat dot com
- Date: Thu, 13 Nov 2003 17:41:39 +0100
- Subject: misunderstanding define-constant?
Hi,
I've some trouble understanding define-constant.
I find the lambda procedures turn into #!null
I used the below expression in a Scheme file and obtained:
#|kawa:210|# XML-transforms
((@ ((*default* . #!null)) . #!null) (*default* . #!null) (*text* . #!null)
(*COMMENT* *preorder* . #!null) (*PI* *preorder* . #!null))
(maybe I reloaded and/or recompiled a couple of times)
(define-constant XML-transforms
`((@
((*default* ; local override for attributes
. ,(lambda (attr-key . value) (enattrX attr-key value))))
. ,(lambda (trigger . value) (cons '@ value)))
(*default* . ,(lambda (tag . elems) (entagX tag elems)))
(*text* . ,(lambda (trigger str)
(if (string? str) (string->goodXML str) str)))
(*COMMENT* *preorder*
. ,(lambda (tag . elems) (list "<!-- " elems " -->")))
(*PI*
*preorder*
. ,(lambda (tag target body)
(list "<?" target " " body "?>")))))
How to properly use define-constant?
Should I care about define-constant only in conjunction with Java types and
modules?
Thanks for your help,
Jorg Hohle