Re: more attempts at modifying define
| Newsgroups | gmane.comp.java.sisc.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Feb 25, 2004 at 05:11:47PM -0800, Turadg Aleahmad wrote: > [email protected] wrote: > > >I just checked in SISC 1.9 code, which is causing your problems with 2 > >and 3. Check out from tag pre1_8_8 to get the 1.8 code. > > > > > > I checked out 1_8_7 just to be safe as that's the binary I'm testing on. > > Now I get a new error for (2). > #;> (load "file:C:/workspace/sisc/src/sisc/modules/optimizer/main.scm") > Error in load. > Caused by Error: expression not valid outside of quasiquote ,x The optimizer depends on a few things. See its module definition in modules/std-modules.scm. The above error message is due to missing an import for pattern-matching. > With (3), the 1.8.7 code helped out some. Now I can load "init2.scm". > I modified eval as such: > > (set! eval > (let-syntax ([old-define (syntax-rules () > [(_ . rest) (define . rest)])]) > (letrec-syntax > ([define (syntax-rules (lambda) > [(_ name (lambda formals . body)) > (old-define name (let ([p (lambda formals . body)]) > > (\@procedure-properties::set-procedure-property! > p 'definition > '(lambda formals . body)) > p))] > [(_ (name . formals) . body) > (define name (lambda formals . body))] > [(_ . rest) (old-define . rest)]))) > > ((lambda (|interaction-environment_tjYQs0KEg| > .... > )) > > > I can load that code and define works fine, but still no procedure > properties: > #;> (load "file:c:/workspace/sisc/src/sisc/boot/init2.scm") > #;> (define (sq x) (* x x)) > #;> (import procedure-properties) > #;> (procedure-property sq 'definition) > #f > Actually, I was suggesting that you literally wrap each incoming s-expression in Matthias' macro, such as: (sisc-eval `(matthias-macro ... ,expr) ...) Scott
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFAPUt8r9IW4v3mHtQRAtIBAJ91DQhmQfjSM/xUfLyqUbUD2VJtbwCghWKV gbuqelRAMS1dT4tpZhpa020= =swrv -----END PGP SIGNATURE-----