cond-expand and import
Dan <[email protected]>
| Newsgroups | gmane.comp.java.sisc.user |
|---|---|
| Message-ID | <[email protected]> |
Hi all, the (module) and (import) macros, or whatever they are, have never ceased to surprise me, with issues ranging from compilation problems to (define-macro) behavior inside a module. Here's the latest, which happens in both 1.13.7 and 1.15 beta: netcafe:~# cat >x.scm (module x (f) (define (f x) x) ) netcafe:~# sisc SISC (1.13.7) #;> (cond-expand (sisc (require-library 'x) (import x))) Error: import from unknown module x However, netcafe:~# sisc SISC (1.13.7) #;> (cond-expand (sisc (require-library 'x))) (x) #;> (cond-expand (sisc (import x))) #;> f #<procedure |@x::f|> Wrapping the (require) and (import) in a begin does not help. And, of course, the very useful #;> (define-syntax reqimp (syntax-rules () ((_ lib) (begin (require-library 'lib) (import lib))))) #;> (reqimp x) Error: import from unknown module x does not work. For comparison, the cond-expand snippet works in Chicken; reqimp, however, doesn't. Frustrated, Dan __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com