chicken-janitors
[Top][All Lists]
Advanced

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

Re: [Chicken-janitors] #893: problem with type annotations and modules


From: Chicken Trac
Subject: Re: [Chicken-janitors] #893: problem with type annotations and modules
Date: Thu, 09 Aug 2012 18:22:38 -0000

#893: problem with type annotations and modules
-----------------------+----------------------------------------------------
  Reporter:  megane    |       Owner:               
      Type:  defect    |      Status:  new          
  Priority:  critical  |   Milestone:  4.8.0        
 Component:  unknown   |     Version:  4.7.x        
Resolution:            |    Keywords:  modules types
-----------------------+----------------------------------------------------

Comment(by sjamaan):

 The real problem isn't in type annotations. It's the fact that macros look
 up "primitive aliases" in the environment, which means they lose their
 original symbol name.  Here's a simplified example:

 {{{
 (module m
  (bar)
  (import chicken scheme)
  (define-syntax bar
    (ir-macro-transformer
     (lambda (e r c) '(quote *)))))

 (import m)
 (assert (eq? '* (bar)))
 }}}

 This assertion should be true, but it isn't.  If you {{{(print (bar))}}},
 it'll show {{{#%*}}} which is wrong.  {{{##sys#strip-syntax}}} can't strip
 the syntax off {{#%*}} because it's not a gensym, and it might actually be
 the real symbol the user typed, so we can't just resolve that back to
 {{{*}}} again.

-- 
Ticket URL: <http://bugs.call-cc.org/ticket/893#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]