chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-janitors] #1060: reexport doesn't reexport implicit syntax


From: Chicken Trac
Subject: Re: [Chicken-janitors] #1060: reexport doesn't reexport implicit syntax exports
Date: Fri, 08 Nov 2013 10:38:44 -0000

#1060: reexport doesn't reexport implicit syntax exports
-----------------------+----------------------------------------------------
  Reporter:  syn       |       Owner:       
      Type:  defect    |      Status:  new  
  Priority:  major     |   Milestone:  4.9.0
 Component:  expander  |     Version:  4.8.x
Resolution:            |    Keywords:       
-----------------------+----------------------------------------------------

Old 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:
>
> {{{
> ;;; example.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))))
>
> )
>
> (module bar
>
> ()
>
> (reexport foo)
>
> )
>
> }}}
>
> To trigger the bug:
>
> {{{
> $ csc -s -J example.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.

New 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.

--

Comment(by syn):

 Fixed the example program.

-- 
Ticket URL: <http://bugs.call-cc.org/ticket/1060#comment:1>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]