This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]