#lang racket/base
(require (prefix-in racket: (only-in racket/math pi sinh cosh sqr
sgn conjugate))
(prefix-in racket: racket/base)
racket/provide
racket/local
(for-syntax racket/base)
racket/stxparam
(only-in '#%paramz
exception-handler-key
parameterization-key
break-enabled-key))
(require (prefix-in kernel: '#%kernel))
(provide exception-handler-key
parameterization-key
break-enabled-key)
(provide define-syntax-parameter
syntax-parameterize)
(define pi racket:pi)
(define e (racket:exp 1))
(define my-current-print-mode "write")
(define current-print-mode
(case-lambda
[() my-current-print-mode]
[(v) (set! my-current-print-mode v)]))
(provide current-print-mode)
(define-syntax (provide-stub-function stx)
(syntax-case stx ()
[(_ name-or-name-pair ...)
(with-syntax ([(provided-name ...)
(map (lambda (name-or-pair)
(syntax-case name-or-pair ()
[x
(identifier? #'x)
#'x]
[(x y)
#'x]))
(syntax->list #'(name-or-name-pair ...)))]
[(impl-name ...)
(map (lambda (name)
(syntax-case name ()
[an-id
(identifier? #'an-id)
(datum->syntax name
(string->symbol
(string-append "racket:"
(symbol->string
(syntax-e name))))
name)]
[(an-id an-impl-name)
#'an-impl-name]))
(syntax->list #'(name-or-name-pair ...)))])
(syntax/loc stx
(begin (begin (define (provided-name . args)
(racket:apply impl-name args))
(provide provided-name))
...)))]))
(provide pi
e
null
eof
#%plain-module-begin
#%module-begin
#%datum
#%app
#%plain-app
#%top-interaction
#%top
module
define
define-values
let-syntax
let-values
let*-values
define-struct
struct
if
cond
else
case
quote
unquote
unquote-splicing
lambda
case-lambda
let
let*
letrec
letrec-values
local
begin
begin0
set!
and
or
when
unless
require
for-syntax
for-template
define-for-syntax
begin-for-syntax
prefix-in
only-in
rename-in
except-in
provide
planet
all-defined-out
all-from-out
prefix-out
except-out
rename-out
struct-out
filtered-out
combine-in
protect-out
combine-out
define-syntax-rule
define-syntax
define-syntaxes
let/cc
with-continuation-mark
*
-
+
=
/
sub1
add1
<
>
<=
>=
cons
car
cdr
list
list?
pair?
null?
not
eq?
values
(rename-out [kernel:apply apply])
call-with-values
gensym
srcloc
make-srcloc
srcloc?
srcloc-source
srcloc-line
srcloc-column
srcloc-position
srcloc-span
make-struct-type
make-struct-field-accessor
make-struct-field-mutator
struct-type?
exn:fail
struct:exn:fail
prop:exn:srclocs
#%stratified-body
)
(define (-identity x) x)
(define (-undefined? x)
(letrec ([y y])
(eq? x y)))
(provide-stub-function
current-output-port
current-print
write
write-byte
display
newline
displayln
current-continuation-marks
void
random
raise
error
raise-type-error
raise-mismatch-error
make-exn
make-exn:fail
make-exn:fail:contract
make-exn:fail:contract:arity
make-exn:fail:contract:variable
make-exn:fail:contract:divide-by-zero
exn-message
exn-continuation-marks
abs
quotient
remainder
modulo
max
min
gcd
lcm
floor
ceiling
round
truncate
numerator
denominator
expt
exp
log
sin
sinh
cos
cosh
tan
asin
acos
atan
sqr
sqrt
integer-sqrt
sgn
make-rectangular
make-polar
real-part
imag-part
angle
magnitude
conjugate
inexact->exact
exact->inexact
number->string
string->number
procedure?
procedure-arity
procedure-arity-includes?
procedure-rename
void?
symbol?
string?
char?
boolean?
vector?
struct?
byte?
number?
complex?
real?
rational?
integer?
exact-integer?
exact?
exact-nonnegative-integer?
inexact?
odd?
even?
zero?
positive?
negative?
box?
equal?
eqv?
caar
cadr
length
list*
list-ref
append
reverse
for-each
map
andmap
ormap
memq
memv
member
memf
assq
assv
assoc
box
unbox
set-box!
make-string
string
string-length
string-ref
string=?
string<?
string>?
string<=?
string>=?
string-ci=?
string-ci<?
string-ci>?
string-ci<=?
string-ci>=?
substring
string-append
string->list
list->string
string->symbol
symbol->string
format
printf
fprintf
string-set!
make-vector
vector
vector-length
vector-ref
vector-set!
vector->list
list->vector
char=?
char<?
char>?
char<=?
char>=?
char-ci=?
char-ci<?
char-ci>?
char-ci<=?
char-ci>=?
char-alphabetic?
char-numeric?
char-whitespace?
char-upper-case?
char-lower-case?
char->integer
integer->char
char-upcase
char-downcase
call-with-current-continuation
call/cc
default-continuation-prompt-tag
make-continuation-prompt-tag
continuation-prompt-tag?
make-reader-graph
make-placeholder
placeholder-set!
eof-object?
read-byte)
(provide set-car! set-cdr!)
(define (set-car! x v)
(error 'set-car! "Not available outside JavaScript context."))
(define (set-cdr! x v)
(error 'set-car! "Not available outside JavaScript context."))