This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.

Source for ticket #276

cc


    

changetime

2012-02-27 04:39:59

component

WG1 - Core

description


id

276

keywords


    

milestone


    

owner

alexshinn

priority

major

reporter

cowan

resolution

duplicate

severity


    

status

closed

summary

Ordering conventions for identifiers in modules

time

2011-09-08 04:15:53

type

defect

Changes

Change at time 2012-02-27 04:39:59

author

cowan

field

comment

newvalue

Yes, it should.  I screwed up.

oldvalue

5

raw-time

1330288799357802

ticket

276

time

2012-02-27 04:39:59

Change at time 2012-02-27 04:39:59

author

cowan

field

description

newvalue


oldvalue

'''New'''

raw-time

1330288799357802

ticket

276

time

2012-02-27 04:39:59

Change at time 2012-02-27 04:39:59

author

cowan

field

resolution

newvalue

duplicate

oldvalue


    

raw-time

1330288799357802

ticket

276

time

2012-02-27 04:39:59

Change at time 2012-02-27 04:39:59

author

cowan

field

status

newvalue

closed

oldvalue

reopened

raw-time

1330288799357802

ticket

276

time

2012-02-27 04:39:59

Change at time 2012-02-27 02:12:33

author

aag

field

comment

newvalue

If there's a replacement ticket, shouldn't this one remain closed?

oldvalue

4

raw-time

1330279953846655

ticket

276

time

2012-02-27 02:12:33

Change at time 2012-02-26 18:27:38

author

cowan

field

comment

newvalue

See replacement ticket #353.

oldvalue

3

raw-time

1330252058602943

ticket

276

time

2012-02-26 18:27:38

Change at time 2012-02-26 18:27:38

author

cowan

field

description

newvalue

'''New'''

oldvalue

For ease of implementation, I think we should make it an error to refer to an identifier before it is imported or define an identifier before it is exported.  This allows modules to just do name control and not also have to be scopes.

So this would be an error (but still permitted as an extension in Schemes that can easily provide it):

{{{
(module
  (define x y)
  (import (something defining y))
  (export x))
}}}

raw-time

1330252058602943

ticket

276

time

2012-02-26 18:27:38

Change at time 2012-02-26 18:27:38

author

cowan

field

resolution

newvalue


    

oldvalue

invalid

raw-time

1330252058602943

ticket

276

time

2012-02-26 18:27:38

Change at time 2012-02-26 18:27:38

author

cowan

field

status

newvalue

reopened

oldvalue

closed

raw-time

1330252058602943

ticket

276

time

2012-02-26 18:27:38

Change at time 2012-02-26 17:05:58

author

alexshinn

field

comment

newvalue

The example is broken, `define` is not a library declaration.
A possible example would have to be `(begin (define x y))`.

However this suggests a misunderstanding of the library
semantics as described in the draft - all declarations are
cond-expanded, an environment of all imports is created,
and then the library body is expanded.  There is no way
any code can interfere with the imports.

We could specify that all imports must occur before all
code (and presumably that all exports then must occur
before all imports as in R6RS), but I'm not sure of the
motivation for this, and am marking the ticket invalid
pending a clearer proposal.

oldvalue

2

raw-time

1330247158243911

ticket

276

time

2012-02-26 17:05:58

Change at time 2012-02-26 17:05:58

author

alexshinn

field

resolution

newvalue

invalid

oldvalue


    

raw-time

1330247158243911

ticket

276

time

2012-02-26 17:05:58

Change at time 2012-02-26 17:05:58

author

alexshinn

field

status

newvalue

closed

oldvalue

new

raw-time

1330247158243911

ticket

276

time

2012-02-26 17:05:58

Change at time 2011-09-23 23:51:07

author

cowan

field

comment

newvalue

Chicken modules work like this, and it's compatible with R6RS.  See also [http://lists.r6rs.org/pipermail/r6rs-discuss/2009-September/005487.html The tale of Professor Simpleton and Dr. Hardcase].

oldvalue

1

raw-time

1316796667000000

ticket

276

time

2011-09-23 23:51:07