[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-janitors] #1131: Kill ##sys#alias-global-hook with fire
From: |
Chicken Trac |
Subject: |
Re: [Chicken-janitors] #1131: Kill ##sys#alias-global-hook with fire |
Date: |
Mon, 09 Jun 2014 19:04:36 -0000 |
#1131: Kill ##sys#alias-global-hook with fire
-----------------------+----------------------------------------------------
Reporter: sjamaan | Owner:
Type: defect | Status: new
Priority: critical | Milestone: 4.10.0
Component: unknown | Version: 4.9.x
Resolution: | Keywords:
-----------------------+----------------------------------------------------
Comment(by sjamaan):
Here's the first:
The following code will compile (or run, in csi). If the module
definition for {{{another}}} is removed, it doesn't. Why? Because when
{{{another}}} imports {{{foo}}}, {{{##sys#mark-imported-symbols}}} will
mark it as {{{##core#aliased}}}, which means {{{##sys#alias-global-hook}}}
will simply pass it through whenever it's subsequently referenced.
{{{
#!scm
(module foo (bar)
(import scheme chicken)
(define (bar x) (+ x 1)))
(module another ()
(import chicken scheme foo)
(define lala bar))
(module whoops (lala2)
(import chicken scheme)
(define lala2 foo#bar))
(import whoops)
(print (lala2 1))
}}}
The question is whether a fully qualified module identifier should work
within another module regardless of whether it's been imported. This part
should be the first to clean up, because {{{##core#aliased}}} is only used
in a handful of places. Unfortunately it's a bit of a mindfuck, because
it is really used all over the place, **through** {{{##sys#global-alias-
hook}}}.
--
Ticket URL: <http://bugs.call-cc.org/ticket/1131#comment:1>
CHICKEN Scheme <http://www.call-with-current-continuation.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.