more attempts at modifying define

Turadg Aleahmad <[email protected]>
Newsgroups gmane.comp.java.sisc.devel
Message-ID <[email protected]>
I'm trying to make  |define| call set-procedure-property in the course 
of doing its business.  This is difficult to do in SISC.

So far I have tried:
1) a Scheme module that modifies the syntax for |define|
2) a customized optimizer
3) modifying |eval|
4) wrapping |eval|

I can't get any of these to work.

1) can't work, AFAIK, because of how SISC expands |define|

2) I can't get an optimizer to load from the REPL.  With a version SISC 
dist:
#;> (load "file:C:/workspace/sisc/src/sisc/modules/optimizer/main.scm")
Error in load: error reading from port '#<input-port>': invalid 
syntactic token
'program'.

3)  I can't get  |eval| from init2.scm to load in the REPL.  There's no 
binding for _analyze! .  Also, why is the first line "(set! eval" 
commented out? 

4) I'm sure I'm doing something wrong here.
(define sisc-eval eval)
(set! eval
  (lambda (x . env)
    (begin
      (display "my eval")
      (\@procedure-properties::set-procedure-property! eval 'definition 
'set)
      (sisc-eval x env)
      )))

I test it with (eval 3 (current-environment)) and it returns:
my evalError in interaction-environment: expected type environment, got 
'(#<environment *toplevel*>)'.

 
I'm totally stumped.  Could this be easier in a version of SISC to 
come?  This is one of the last issues that necessitates STk for our 
students. It would be great to be STK-free for summer classes.
 


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.