Summary

reexport doesn't reexport implicit syntax exports

Metadata

Description

Given a module that exports some syntax which expands to an identifier which isn't explicilty exported, that syntax will not work if it is reexported by another module. Example:

 ;;; foo.scm
 
 (module foo
 
 (some-syntax)
 
 (import scheme)
 
 (define-syntax some-implicitly-used-syntax
   (syntax-rules ()
     ((_ x) x)))
 
 
 (define-syntax some-syntax
   (syntax-rules ()
     ((_ x)
      (some-implicitly-used-syntax 'x))))
 
 )
 
 ;;; bar.scm
 
 (module bar
 
 ()
 
 (reexport foo)
 
 )

To trigger the bug:

 $ csc -s -J foo.scm 
 $ csc -s -J bar.scm 
 $ csi -R foo -p '(some-syntax bar)'
 bar
 $ csi -R bar -p '(some-syntax bar)'
 
 Error: unbound variable: some-implicitly-used-syntax

This was tested with version 4.8.0.5 only so far.

Changes and comments

[2013-11-08 11:38:44 UTC] syn changed description

[2013-11-08 11:38:44 UTC] syn wrote:

Fixed the example program.

[2013-11-08 11:42:07 UTC] ckeen wrote:

This is also broken for Version 4.8.3 (rev ba01911)

[2013-11-08 13:39:06 UTC] ecloud set cc to ecloud

[2013-11-08 20:36:45 UTC] syn changed priority from major to minor

[2013-11-08 20:36:45 UTC] syn changed type from defect to enhancement

[2013-11-08 20:36:45 UTC] syn changed milestone from 4.9.0 to 4.10.0

[2013-11-08 20:36:45 UTC] syn wrote:

Given that automatic export of implicitly referenced identifiers is an undocumented feature of the module system as of now, this ticket should be considered a feature request instead.

[2015-08-27 08:59:37 UTC] sjamaan changed milestone from 4.10.0 to 4.11.0

[2015-11-20 14:38:28 UTC] sjamaan changed status from new to closed

[2015-11-20 14:38:28 UTC] sjamaan set resolution to fixed

[2015-11-20 14:38:28 UTC] sjamaan wrote:

This seems to work now. Probably due to the fix for #1149.