Changeset 12681 in project


Ignore:
Timestamp:
12/01/08 06:45:11 (11 years ago)
Author:
Ivan Raikov
Message:

Using string comparison, because equal? fails on the same symbols sometimes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/3/varsubst/trunk/varsubst.scm

    r11256 r12681  
    3131
    3232(define (subst-includes? k subst)
    33   (and (subst? subst) (any (lambda (p) (eq? k (car p))) subst)))
     33  (and (subst? subst) (any (lambda (p)
     34                             (equal? (->string k) (->string (car p)))) subst)))
    3435
    3536(define (subst-lookup k subst)
    3637  (and (subst? subst)
    37        (let ((v (find (lambda (p) (eq? k (car p))) subst)))
     38       (let ((v (find (lambda (p) (equal? (->string k) (->string (car p)))) subst)))
    3839         (cadr v))))
    3940
     
    5657
    5758(define (subst-driver var? bind? var bind subst-term . rest)
    58   (let-optionals rest ((prefix "t"))
     59  (let-optionals rest ((prefix "v"))
    5960   (letrec
    6061       ((k (lambda (t subst)
    61              (cond ((var? t)  => (lambda (a) (if (subst-includes? a subst) (subst-lookup a subst) t)))
     62             (cond ((var? t)  => (lambda (a)
     63                                   (if (subst-includes? a subst) (subst-lookup a subst) t)))
    6264                   ((bind? t) =>
    6365                    (lambda (be)
Note: See TracChangeset for help on using the changeset viewer.