chicken-janitors
[Top][All Lists]
Advanced

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

[Chicken-janitors] #1341: import-for-syntax doesn’t seem to work right w


From: Chicken Trac
Subject: [Chicken-janitors] #1341: import-for-syntax doesn’t seem to work right when the imported module is in the same file
Date: Tue, 24 Jan 2017 11:54:09 -0000

#1341: import-for-syntax doesn’t seem to work right when the imported module is 
in
the same file
----------------------+-------------------------------
 Reporter:  kooda     |                 Owner:
     Type:  defect    |                Status:  new
 Priority:  major     |             Milestone:  5.0
Component:  compiler  |               Version:  4.11.0
 Keywords:            |  Estimated difficulty:  hard
----------------------+-------------------------------
 This snippet works in csi but doesn’t when compiled:

 {{{
 (module truc (coucou)
 (import scheme)
 (define (coucou)
   `(display "coucou\n")))

 (module bidule (blah)
 (import scheme chicken)
 (import-for-syntax truc)
 (define-syntax blah
   (er-macro-transformer
     (lambda (f r c)
       (coucou)))))

 (import bidule)

 (blah)
 }}}

 It gives different error messages whether on CHICKEN 4 or CHICKEN 5:

 CHICKEN 4 error:
 {{{
 Error: during expansion of (blah ...) - unbound variable: truc#coucou

         Call history:

         <syntax>          (##core#begin (blah))
         <syntax>          (blah)
         <eval>    (coucou)      <--
 }}}

 CHICKEN 5 error:
 {{{
 Error: cannot load extension: truc

         Call history:

         <syntax>          (##core#undefined)
         <syntax>          (##core#require chicken chicken#)
         <syntax>          (##core#begin (##core#require-for-syntax
 chicken-syntax) (##core#require library))
         <syntax>          (##core#require-for-syntax chicken-syntax)
         <syntax>          (##core#require library)
         <syntax>          (##core#undefined)
         <syntax>          (import-for-syntax truc)
         <syntax>          (##core#elaborationtimeonly (##core#begin
 (import26 truc)))
         <syntax>          (##core#begin (import26 truc))
         <syntax>          (import26 truc)
         <syntax>          (##core#begin (##core#require truc truc#))
         <syntax>          (##core#require truc truc#)
         <syntax>          (##sys#load-extension (##core#quote truc)
 (##core#quote (truc#)))
         <syntax>          (##core#quote truc)
         <syntax>          (##core#quote (truc#))
         <eval>    (##sys#load-extension (##core#quote truc) (##core#quote
 (truc#)))     <--
 }}}

--
Ticket URL: <https://bugs.call-cc.org/ticket/1341>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

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