Commit Graph

41059 Commits

Author SHA1 Message Date
Sam Tobin-Hochstadt
b1a415f232
Add additional syntax tests in GHA. (#3078)
Suggested by @sorawee.
2020-03-22 11:34:06 -04:00
Matthew Flatt
ba59d87ac4 makefile: add an advice-giving clean target
Implementing a thorough `clean` target for a repo-based is tedious and
error-prone. Instead, make the `clean` target suggest `git clean -d -x
-f .`, which is more effective in most situations (but seems too
dangerous to run automatically).
2020-03-21 15:09:58 -06:00
Matthew Flatt
9effeef7ab cs: fix stencil-vector HAMT for 32-bit platforms 2020-03-17 18:24:30 -06:00
Matthew Flatt
3390896a59 schemify: clean up unnecessary lets in interpreter
Collapse `let` with unused binding to `begin`, and then
collapse resulting nested `begin`s.
2020-03-17 18:24:30 -06:00
Ben Greenman
b69c1208b7 doc: typo, expr -> stx-expr 2020-03-17 12:12:25 -04:00
Sam Tobin-Hochstadt
c7a9690143 Fix recursive make invocation.
Eliminates warning in DrDr.
2020-03-16 13:35:59 -04:00
Matthew Flatt
8f256c9261 cs: fix error-print-width handling when output just fits the limit
For example, if the limit is 5, then "abcde" should print as "abcde",
not "ab...".
2020-03-13 16:12:34 -06:00
Sorawee Porncharoenwase
74c0844101 Also fix ~.a in 3m 2020-03-13 15:20:10 -06:00
Sorawee Porncharoenwase
b8eee66b72 add a test for minimum value for error-print-width 2020-03-13 15:20:10 -06:00
sorawee
8f286fc810 Fix #2986: error-print-width 3 shouldn't error 2020-03-13 15:20:10 -06:00
Matthew Flatt
c52d45613b minor whitespace corrections 2020-03-13 11:32:49 -06:00
Matthew Flatt
f1a177e880 cs: fix applicable struct implemented with applicable struct 2020-03-13 11:14:39 -06:00
Matthew Flatt
edfdcb0b6d add call-in-continuation
The `call-in-continuation` function generalizes applying a
continuation to values by accepting a thunk that is called in the
restored continuation. In other words, insteda of having to use the
pattern

 ((call/cc (lambda (k)
             .... (set! saved-k k) ...
             (lambda ()
               original-result))))
 ...
 (saved-k (lambda () new-result))

The extra call and thunk on the capture side can be omitted:

 (call/cc (lambda (k)
            .... (set! saved-k k) ...
            original-result))
 ...
 (call-in-continuation saved-k (lambda () new-result))

At the Chez Scheme level, a `call-in-continuation` in tail position
within a function can avoid forming a closure for its second argument.
The `call-in-continuation` function at the Racket CS level doesn't yet
provide that benefit.

The `call-in-continuation` operation is called `continuation-slice` in
Feeley's "A Better API for First-Class Continuations".
2020-03-13 09:46:12 -06:00
Matthew Flatt
9ef2124a38 speed up keyword expansion
Expansion of a procedure with keywords is quadratic due to generating
a nested sequence of `let`s, but speed it up by roughly a constant
factor by using a dintinct symbol for each nested layer.

Related to #3070
2020-03-13 09:46:12 -06:00
Matthew Flatt
f98d0a5cc1 cs: use call-in-continuation
Using `call-in-continuation` to apply a thunk within a continuation
slightly simplifies and speeds up parts of the implementation of
delimited continuations.
2020-03-13 09:46:12 -06:00
sorawee
3ddc1ca367
Fix typos (protect-syntax -> syntax-protect) (#3069) 2020-03-11 11:47:09 -04:00
Matthew Flatt
a105e47d35 Inside Racket docs: add advice on embedding files
Since embedding "petite.boot", "scheme.boot", and "racket.boot" can be
a good idea, add some advice to the documentation to show how that can
be done.
2020-03-08 18:05:59 -06:00
Matthew Flatt
601ffc9b36 avoid compiler warnings 2020-03-07 14:42:41 -07:00
Matthew Flatt
fab04633f3 makefile: add DISABLE_STATIC_LIBS 2020-03-07 14:24:50 -07:00
Matthew Flatt
0de88f203d struct: don't generate excessive struct-field-index code
The expansion of `struct` created far too much code to parameterize
`struct-field-index`, making expansion of a `struct` form with just
100 or 200 fields take a noticeably long time to expand.
2020-03-07 10:45:33 -07:00
Matthew Flatt
00b6803e36 cs: enable embedding in other applications
The "Inside: Racket C API" manual now has a CS part and a BC part.
2020-03-07 06:39:41 -07:00
Gustavo Massaccesi
d6d30d2fcc cs: sync with Chez Scheme change fix in cptypes 2020-03-07 08:07:30 -03:00
Matthew Flatt
e2c9544ed5 bc: fix hash-set key replacement for eq? values 2020-03-06 11:15:50 -07:00
sorawee
6685120c0a
Doc: more illustrative example for the filter-map function (#3066) 2020-03-05 21:46:15 -05:00
Matthew Flatt
b4dd4684d9 cs: fix problem getting structure hash codes 2020-03-05 11:28:28 -07:00
Sam Tobin-Hochstadt
8a63d80379 Preserve undocumented args syntax class attribute.
PR #2678 unintentionally removed this attribute, but it was used
at least by "collections-lib" and "static-rename-lib".

cc @sorawee @lexi-lambda @jackfirth @rmculpepper
2020-03-04 15:05:16 -05:00
Sorawee Porncharoenwase
cc76761c1f Update grammar in the syntax class page, s/subdefthing/defsubthing/ 2020-03-04 13:22:19 -05:00
Sorawee Porncharoenwase
3043dbd35c Expose function-header's name, document attributes, fix links 2020-03-04 13:22:19 -05:00
Sorawee Porncharoenwase
1b4126d1e5 Fix a typo, add examples, switch to non-experimental form 2020-03-04 13:22:19 -05:00
sorawee
29c518abbc
Allow multiple catalogs in raco pkg install and friends
Allow `--catalog` to be specified multiple times.
2020-03-04 07:02:45 -07:00
Ben Greenman
258eee40ce
contract: use impersonator prop. for impersonator-unconstrained-domain->/c (#3055)
rename the contract property from a chaperone prop to an impersonator
prop (looks like this was an old copy/paste error)
2020-03-03 15:50:19 -05:00
Štěpán Němec
95b9f0e210 doc: Fix some typos 2020-03-03 07:56:16 -07:00
Štěpán Němec
098a784b88 doc: Fix an error
".rkt" suffix is not added for relative path strings.

Discussed here: https://groups.google.com/d/msg/racket-users/lxQ-SqZ0QNY/8bqv0YqPDgAJ
2020-03-03 07:55:50 -07:00
Sorawee Porncharoenwase
3bb873aea8 Remove contract for define/generic
`local-id` and `method-id` don't have a syntax identifier as a value, so
a contract is inappropriate here.
2020-03-03 07:54:31 -07:00
Ben Greenman
a57f96ea9c
doc: contract, clarifications (#3061)
- reword the first-page explanation of chaperone contracts;
  try to give a positive description by talking about wrappers first
  (rather than starting with what chaperones maybe don't do)

- name the recognizer functions for chaperone & impersonator contracts
  (on the first page)

- clarify that `contract-projection` and `contract-val-first-projection`
  are bad --- that there's a preferred alternative

- describe the outputs of `contract-projection` and
  `contract-val-first-projection`; their docs were identical before, but
  now re-use prose from sec 8.7 (Building New Contract Combinators)
2020-03-01 08:49:36 -05:00
Ben Greenman
24cdc58951
style: consistent figure style (#3060)
Use a consistent style for the "good / bad" examples:

- start the code at the far left of each box
- keep a little space between the top of the box & the label
2020-02-28 08:42:59 -05:00
Ben Greenman
354dfbac04 doc: '-> void' to '-> void?'
(accepts anything non-#f vs. accepts (void))
2020-02-27 15:51:20 -05:00
kryptine
8dd65db7e2
Update package LICENSE files (#3048)
* Remove obsolete LGPL license files
* Add LICENSE files to packages
2020-02-25 14:13:34 -05:00
James Bornholt
ac41c8a361 Make get-pure-port redirection case-insensitive
GitHub's CDN seems to have recently started returning the `Location` header for a redirect with a lowercase `l`, which breaks the redirect logic. The HTTP spec says that header names are case-insensitive, so we need to look for either version.
2020-02-25 13:38:44 -05:00
Ben Greenman
164ce0274c doc: typo, 'produce' -> 'produces' 2020-02-24 21:09:25 -05:00
Matthew Flatt
fb620d5556 cs: constrain register-process-global to intended behavior
Make `register-process-global` check for byte strings, and avoid
retaining the byte string that it's given (in case that changes, for
example).

Closes #3053
2020-02-24 07:23:59 -07:00
John Clements
b63e9a4983
add text on spaces (#3049)
Merging this. Please feel free to revert this change if it's not the right thing.
2020-02-23 09:40:20 -08:00
Matthew Flatt
ef856eda76 cs: fix separator for embedded boot files 2020-02-22 17:32:51 -07:00
Matthew Flatt
06cbc94ced sync with updated Chez Scheme 2020-02-22 13:23:52 -07:00
Matthew Flatt
a68c8eadc6 cs: fix hash{,eq,eqv} on an odd number of arguments
Closes #3051
2020-02-21 21:26:18 -07:00
Matthew Flatt
bfce3ba665 fix glib-log test 2020-02-21 08:11:27 -07:00
Matthew Flatt
dad9995f56 cs: add glib logging hook
Building glib-specific support into the main Racket executable is
unsatisfying, but it's consistent with Racket BC, and the alternative
is especially tedious to deal with places and namespaces and
allocation.
2020-02-20 14:52:30 -07:00
Stephen Chang
e4c0f450e5
fix typos: Guide 16.3 Module Instantiations and Visits 2020-02-20 12:17:13 -05:00
Matthew Flatt
fe64841290 cs: fix error conversion condition-who is a string
For example, `(string->symbol 10)` raises a Chez Scheme condition with
the string "string->symbol" instead of 'string->symbol.
2020-02-19 20:04:33 -07:00
Matthew Flatt
906af72f82 dump-memory-stats: report bytes used for still-marshaled bytecode 2020-02-19 17:33:49 -07:00