Summary

hidden/gensymed variables are registered for export

Metadata

Description

This might cause problems if an interned symbol with the same name is defined. Find out if this really is a problem.

Also: alias global hook strikes again ;)

Example:

 (module foo (x123)
 
 (import scheme (chicken syntax))
 
 (define-syntax define-x123
   (ir-macro-transformer
      (lambda (e i c)
        (let ((name (gensym 'x)))
          `(define ,name 'blah))))
 
 (define x123 5)
 
 (define-x123) ;; Should not overwrite the interned version of x123, which happens if both collide on foo#x123!
 )
 
 (import foo)
 (print x123) ;; Should print 5, not blah

Of 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).

Changes and comments

[2019-05-07 21:05:31 UTC] sjamaan wrote:

Note: If this is fixed we should be able to remove the `##sys#register-export` in `##core#define-foreign-type`

[2019-05-07 21:09:26 UTC] sjamaan changed description

[2019-05-07 21:09:43 UTC] sjamaan changed description

[2019-08-25 17:39:38 UTC] felix changed milestone from 5.2 to 5.3

[2021-04-12 13:38:48 UTC] sjamaan changed milestone from 5.3 to 5.4

[2023-11-06 22:09:25 UTC] felix changed milestone from 5.4 to someday

[2023-11-06 23:38:15 UTC] felix changed milestone from someday to 6.0.0

[2023-11-14 18:51:09 UTC] felix changed milestone from 6.0.0 to someday