Changes between Initial Version and Version 2 of Ticket #1615


Ignore:
Timestamp:
05/07/19 21:09:26 (5 years ago)
Author:
sjamaan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1615 – Description

    initial v2  
    22
    33Also: alias global hook strikes again ;)
     4
     5Example:
     6
     7```
     8(module foo (x123)
     9
     10(import scheme (chicken syntax))
     11
     12(define-syntax define-x123
     13  (ir-macro-transformer
     14     (lambda (e i c)
     15       (let ((name (gensym 'x)))
     16         `(define ,name 'blah))))
     17
     18(define x123 5)
     19
     20(define-x123) ;; Should not overwrite the interned version of x123, which happens if both collide on foo#x123!
     21)
     22
     23(import foo)
     24(print x123) ;; Should print 5, not blah
     25```
     26
     27Of course this requires some fiddling to get the numbers right, which would differ per CHICKEN version (a proper test would require reading the gensym counter to force the collision, or something like that).