Commit Graph

38543 Commits

Author SHA1 Message Date
Matthew Flatt
a49bd5dc00 fix config spec for installer build
This typo likely doesn't affect anything right now, but it
might one day.
2017-03-24 15:40:56 -06:00
Gustavo Massaccesi
409321c03b raco: show all the matching commands for an ambiguous prefix 2017-03-24 13:16:36 -06:00
Matthew Flatt
056041bd07 document current-command-line-arguments encoding
Closes #1641
2017-03-22 12:26:02 -06:00
Matthew Flatt
424906af0a ffi/com: fix unsigned-int test
Closes #1633
2017-03-22 12:26:02 -06:00
Matthew Butterick
e08328c68c unmisspell configure-runtime 2017-03-22 12:25:41 -06:00
Matthew Butterick
6493a502c0 use deftech rather than emph 2017-03-22 12:25:41 -06:00
Matthew Butterick
8694b99608 update docs to use configure-runtime submodule rather than obsolete syntax property 2017-03-22 12:25:41 -06:00
Matthew Butterick
333f602a70 Improve assq example
Let me `assq` something: doesn’t it seem inapt to demonstrate this function with integers, when `eq?` doesn’t give consistent results for numbers?
2017-03-22 12:24:34 -06:00
Matthew Flatt
9f2db6a915 add history annotations for racket/port changes
Goes with 1309cf1649.
2017-03-17 08:37:49 -06:00
Marc Burns
1309cf1649 Add procedures like port->X but close the port (#1634) 2017-03-16 15:52:43 -04:00
Ben Greenman
10aaff692b [doc] link max <--> argmax 2017-03-12 22:33:02 -04:00
Robby Findler
faa385b337 small cleanup of contract 2017-03-11 13:06:22 -06:00
Robby Findler
9b987800fb adjust things so that integer-in contracts can have other names 2017-03-08 09:31:33 -06:00
Ingo Blechschmidt
4107ee7ea0 fix tiny typo (#1630) 2017-03-07 22:20:56 -05:00
Robby Findler
f5c5db3b3d fix a bug in recent and/c improvements and add proper printing for integer-in 2017-03-07 20:40:26 -06:00
Robby Findler
fe9288d0d5 remove suprious hash 2017-03-07 19:00:36 -06:00
Robby Findler
2febfb1dba declare that examples that raise errors raise errors 2017-03-07 18:59:44 -06:00
Robby Findler
3a639d7794 improve interaction between natural?, exact-positive-integer?, exact-integer?,
and/c, and between/c (which implies <=/c and >=/c) so that they turn
themselves into integer-in when appropriate

for example, (contract-stronger? (integer-in 0 4) (and/c natural? (<=/c 4)))
returns #t
2017-03-07 16:38:35 -06:00
Robby Findler
87e024d55c allow #f as arguments to integer-in 2017-03-07 16:27:18 -06:00
Robby Findler
7c3412957a add the same fast path to contract? and chaperone-contract? that is already in flat-contract? 2017-03-07 16:27:18 -06:00
Robby Findler
36368628af adjust -> expansion to make it more friendly to possible inlining 2017-03-07 16:27:17 -06:00
Benjamin Greenman
6e746891ef clarify error message for take and drop (#1582) 2017-03-06 18:45:09 -05:00
James Bornholt
b978631823 Clarify order of arguments for stream-fold (#1578) 2017-03-06 18:44:42 -05:00
Benjamin Greenman
d8b78e823e relax contract for (random min max [rand-gen]) (#1626)
Relax contract for `(random min max [rand-gen])` to accept any pair of
integers such that:
- `(< min max)`
- `(- max min)` is between 1 and 4294967087
2017-03-06 18:43:04 -05:00
Robby Findler
dbddb3785e add natural? to the known predicates with generators 2017-03-05 21:35:20 -06:00
Robby Findler
7bd7ec5aaf remove spurious } 2017-03-05 21:35:20 -06:00
Leif Andersen
1cbd75436b Eta expand natural?
Doing this eta expansion has the advantage that error messages
will point to `natural?` rather than `exact-nonnegative-integer?`
2017-03-03 09:58:19 -05:00
Leif Andersen
eca457e886 Add history for the following functions:
positive-integer?
negative-integer?
nonpositive-integer?
nonnegative-integer?
natural?
2017-03-03 09:29:57 -05:00
Matthew Flatt
1d61d9b752 add 'vm mode to system-type 2017-03-03 06:56:09 -07:00
Leif Andersen
1ebb3d5ef3 nonnegative-integer -> exact-nonnegative-integer 2017-03-02 19:24:12 -05:00
Leif Andersen
1ac2e77d00 Add natural? as an alias for nonnegative-integer? 2017-03-02 19:24:12 -05:00
Leif Andersen
c7df5f4150 And add tests 2017-03-02 19:24:12 -05:00
Leif Andersen
edf4bcfe78 Add documentation for the predicates in the previous commit 2017-03-02 19:24:12 -05:00
Leif Andersen
c911e4b52d Add the following predicates to racket/math:
- positive-integer?
- negative-integer?
- nonpositive-integer?
- nonnegative-integer?

These are like their exact-* counterparts provided by racket/base,
but they work for inexact numbers, and not just exact ones.
2017-03-02 19:24:12 -05:00
Matthew Flatt
d08a4cddfb fix stack-overflow handing lin the compiler's letrec-check pass
Closes #1621
2017-02-27 09:43:59 -07:00
Matthew Flatt
f19d655cbc fix optimizer bug related to single-use functions
Fix problem with once-use tracking and delayed variable-use marking
that is performed for local function bodies. A delayed variable-use
registration might happen after a once-used variable is replaced by
its use.

This scenario is difficult to provoke, because the optimizer has to
first decide not to move a once-use function, and in a latter pass
decide to move it after all. There's not enough information to
retract the tentative use plus its transitive implications.

The solution is to avoid the generic once-use layer for `lambda` forms
whose uses are delayed (and that likely has a good effect on inlining
anyway). The other half of the solution is to avoid transitive use
marking on a once-used variable whose expression has been moved (and
there are no transitive things to skip, because that expression isn't
a `lambda` form).
2017-02-26 08:58:36 -07:00
Matthew Flatt
a7ac75f15d use RTLD_LOCAL when loading extensions on Mac OS
It appears that Mac OS wants `RTLD_LOCAL` in the dlopen() call,
otherwise dlsym() searches through all previously open shared objects
– even though dlopen() is given a specific library handle.
2017-02-25 13:57:48 -07:00
Matthew Flatt
3c563484c6 fix memory-management bug in struct->vector
Closes PR 15410
2017-02-25 08:32:08 -07:00
Matthew Flatt
481dc9b0e8 fix port line, col, and pos to stay at #f when set to #f 2017-02-23 19:56:21 -07:00
Matthew Flatt
39b2a61700 fix mutability checking in impersonator-struct
Thanks to Scott Moore for the repair.
2017-02-23 19:56:21 -07:00
Ben Greenman
591d57b5bc typo: pluber? -> plumber? 2017-02-22 23:20:12 -05:00
Sam Caldwell
9f34be4b83 fix typo (#1620) 2017-02-17 21:54:37 +00:00
Andrew Kent
98b167d3a0 fix for/fold/derived examples
The previous for/fold/derived examples in the docs
incorrectly expanded, placing the entire body of the
user defined for loop into a let expression inside of
for/fold/derived. This meant that break clauses (i.e. #:break
or #:final) that appeared in the body of the user-defined
for loop were not visible to the underlying for/fold/derived
macro after expansion and therefore usages of #:break or #:final
incorrectly resulted in syntax errors (since with the incorrect
expansion, they were seemingly misplaced keywords inside of a let).

With this PR the for/fold/derived examples in the docs now
expand correctly into a form that mirrors the actual
expected syntax of for loops:

(user-defined-for (for-clause ...) body-or-break ... body)

==(now expands more or less into)==>

(for/fold/derived (for-clause ...) body-or-break ... body)

Or in other words, the body of the user defined for loop now correctly
expands directly into the body of for/fold/derived.
2017-02-17 06:32:25 -07:00
Leandro Facchinetti
ec5923a5c7 Fix typo in “INSTALL.txt” 2017-02-17 06:31:10 -07:00
Georges Dupéron
1c5747be98 Test for 69d7636 fix position counting with internal read shortcut (issue #1599) 2017-02-17 06:30:37 -07:00
Robby Findler
9098b39871 remove security mention that can be misconstrued 2017-02-15 13:58:51 -06:00
Jay McCarthy
fafa9c2bbd Merge pull request #1618 from leafac/fix-git-checkout
Fix “git-checkout”
2017-02-13 10:29:51 -05:00
Leandro Facchinetti
7ae83ba1e6 Fix “git-checkout” by adding HTTP auto-reconnect 2017-02-11 08:55:41 -05:00
Robby Findler
0ace11ddcd fix bug in build-source-location
closes #1605
2017-02-10 20:43:11 -06:00
Alexis King
6632beeca9 Fix wrap-expr/c and expr/c to reflect the intended use
The expr/c syntax class, as well as its underlying implementation
function, wrap-expr/c, previously produced misleading error messages.
The main purpose of these tools is to ensure a user-provided expression
conforms to a macro-provided contract. However, contract errors produced
by these forms were consistent with situations where both value and
contract were provided by the same party.

This fixes the discrepancy by changing how these forms assign blame to
emulate contract errors that arise from improper function arguments,
since most expressions provided to macros are semantically similar to
function arguments. All examples within the documentation itself
reflect this use case.

These changes alter the contents of error messages raised by expr/c and
wrap-expr/c, which could theoretically break some test suites, but it’s
extremely unlikely that any non-test code would depend on the precise
wording of contract error messages, and the interface is otherwise
completely backwards-compatible.

fixes #1412
2017-02-08 11:04:04 -05:00