add `racket/kernel/init'

This commit is contained in:
Matthew Flatt 2013-02-26 19:00:53 -07:00
parent 2646ff6895
commit e15569e006
6 changed files with 39 additions and 14 deletions

View File

@ -1,2 +1,5 @@
(module kernel '#%kernel
(#%provide (all-from '#%kernel)))
(#%provide (all-from '#%kernel))
(module reader syntax/module-reader
#:language 'racket/kernel))

View File

@ -0,0 +1,5 @@
#lang racket/kernel
(#%require "../private/top-int.rkt")
(#%provide (all-from racket/kernel)
#%top-interaction)

View File

@ -14,22 +14,11 @@
"map.rkt" ; shadows #%kernel bindings
"kernstruct.rkt"
"norm-arity.rkt"
"top-int.rkt"
'#%builtin ; so it's attached
(for-syntax "kw.rkt"
"norm-define.rkt"))
(define-syntaxes (#%top-interaction)
(lambda (stx)
(if (eq? 'top-level (syntax-local-context))
'ok
(raise-syntax-error
#f
"not at top level"
stx))
(if (symbol? (syntax-e stx))
(raise-syntax-error #f "bad syntax" stx)
(datum->syntax stx (cdr (syntax-e stx)) stx stx))))
(define-values (new-apply-proc)
(make-keyword-procedure
(lambda (kws kw-args proc args . rest)

View File

@ -0,0 +1,17 @@
(module pre-base '#%kernel
(#%require (for-syntax '#%kernel))
(#%provide #%top-interaction)
(define-syntaxes (#%top-interaction)
(lambda (stx)
(if (eq? 'top-level (syntax-local-context))
'ok
(raise-syntax-error
#f
"not at top level"
stx))
(if (symbol? (syntax-e stx))
(raise-syntax-error #f "bad syntax" stx)
(datum->syntax stx (cdr (syntax-e stx)) stx stx)))))

View File

@ -9,7 +9,7 @@
@title{Kernel Forms and Functions}
@defmodule*[(racket/kernel)]{The @racketmodname[racket/kernel] library
@defmodulelang[racket/kernel]{The @racketmodname[racket/kernel] library
is a @tech{phase-collapsing} module that provides a minimal set of syntactic
forms and functions.}
@ -35,3 +35,12 @@ functions that are not exported by @racketmodname[racket/base] because
@racketmodname[racket/base] exports improved variants. The exact set
of function bindings exported by @racket[racket/kernel] is unspecified
and subject to change across versions.
@section[#:style '(hidden toc-hidden)]{}
@defmodule[racket/kernel/init]{The @racketmodname[racket/kernel/init]
library re-provides all of @racketmodname[racket/kernel]. It also
provides @racket[#%top-interaction], which makes
@racketmodname[racket/kernel/init] useful with the @Flag{I}
command-line flag for @exec{racket}.}

View File

@ -1,6 +1,8 @@
Version 5.3.3.6
Added "phase-collapse" module inference and instantiation
compiler/zo-structs: added flags field to mod
racket/kernel: removed #%top-interaction
racket/kernel/init: added
Version 5.3.3.4
Added impersonator-ephemeron