[plt-scheme] Problems with eval

From: Chongkai Zhu (czhu at cs.utah.edu)
Date: Thu Jul 3 14:05:43 EDT 2008

(require (for-syntax scheme/base))

?


Doug Williams wrote:
> I am converting the inference collection over to run on V4.0.1 and I'm 
> having a problem with dynamically evaluating a lambda expression.  
> Here is a snippet of the code that gives the error:
>
> #lang scheme/base
> ...
> (define (activate-rule rule initial-node)
> ...
>                   (if (null? match-constraints) ; 
> match-constraint-predicate
>                       #f
>                       (eval
>                        `(lambda ,(if assertion-variable
>                                      (cons assertion-variable
>                                            (pattern-variables pattern))
>                                      (pattern-variables pattern))
>                           (and , at match-constraints))))
> ...
>   )
>
> And, the error I get is:
>
> compile: bad syntax; function application is not allowed, because no 
> #%app syntax transformer is bound in: (lambda (?size ?peg) (and (not 
> (eq? ?peg (quote right)))))
>
> This code works in V372.
>
> Any ideas?
>
> Doug
> ------------------------------------------------------------------------
>
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>   



Posted on the users mailing list.