Re: equality of syntax objects

2024-05-23 Thread Damien Mattei
On Thu, May 23, 2024 at 12:12 AM Maxime Devos wrote: > > So, instead of checking identifiers with free-identifier=?, instead try > ‘syntax->datum’ to extract the name (with lexical information removed) + > ‘eq?’ (to compare two symbols). > :-O yes. i did not think it.it is the first year i use '

RE: equality of syntax objects

2024-05-22 Thread Maxime Devos
>asked more simply: >how to know ,for two syntax objects now different but that represents two different procedures created with the same name at two different moment,how to know that the names are still the same? >i see two solutions: -parse the representation string to know for example expt tha

Re: equality of syntax objects

2024-05-20 Thread Damien Mattei
it works :-) (define (syntax-string=? obj1 obj2) (define str-obj1 (format #f "~s" obj1)) (define str-obj2 (format #f "~s" obj2)) (define lst-split-str-obj1 (string-split str-obj1 #\space)) (define lst-split-str-obj2 (string-split str-obj2 #\space)) (string=? (car (reverse lst-split-str-o

Re: equality of syntax objects

2024-05-20 Thread Damien Mattei
asked more simply: how to know ,for two syntax objects now different but that represents two different procedures created with the same name at two different moment,how to know that the names are still the same? i see two solutions: -parse the representation string to know for example expt that e

equality of syntax objects

2024-05-20 Thread Damien Mattei
hello, i want to check the equality of two syntax objects. i wrote this macro: (define (check-syntax=? obj1 obj2) (display "check-syntax=? : obj1 =") (display obj1) (newline) (display "check-syntax=? : obj2 =") (display obj2) (newline) (define rv (and (identifier? obj1) ;(syntax? obj1)