Commit Graph

29727 Commits

Author SHA1 Message Date
Robby Findler
ad86a72143 fix stronger for ->* when there are #:pre and #:post conditions specified 2013-07-11 06:25:10 -05:00
Robby Findler
402ddcbf1e more new contract test suite cleanups 2013-07-11 06:25:06 -05:00
Eric Dobson
c910252fdf Redo the calculation of opt-lambda expansion.
Closes PR 13661.
Closes PR 13584.
2013-07-10 23:27:05 -07:00
Eric Dobson
39333f6626 Move files accidentily put in collects into pkgs. 2013-07-10 23:09:11 -07:00
Eric Dobson
e26bbffbc9 Make case-lambda correctly typecheck more interesting cases.
Also doesn't typecheck dead code based on case-lambda branches never
taken.

Closes PR 12973.
2013-07-10 22:16:46 -07:00
Eric Dobson
6aad234d01 Cleanup provide handling in TR. 2013-07-10 21:13:59 -07:00
Vincent St-Amour
cbd52a9536 Avoid output in generics tests. 2013-07-10 16:40:34 -04:00
Vincent St-Amour
52e09c60c3 Extra generics test. 2013-07-10 16:40:30 -04:00
Carl Eastlund
704857bbfe Fixed bugs related to define/generic and to define-generics at top-level.
Added tests using define/generic in both #:defaults and #:fallbacks, both inside
modules and at the top level.  Changed the implementation of define-generics so
that defaults and fallbacks come after method definitions so that define/generic
works properly.  Changed internal names to be created with format-id and
syntax-local-introduce rather than generate-temporaries so that they work at the
top level.
2013-07-10 16:10:44 -04:00
Matthew Flatt
30a1c3565d fix "collects" path setup in 3m build 2013-07-10 13:41:06 -06:00
Matthew Flatt
da3ac6159d raco setup: exit with error status on failed pkg dependency check
Also, clean up printing of check errors to prefix each line with
`raco setup' (like everything else).
2013-07-10 13:19:13 -06:00
Matthew Flatt
32b0064b56 Don't install "libracket3m.a" by default
Configure with `--enable-libs' to install the library.
2013-07-10 13:09:41 -06:00
Matthew Flatt
c1037f65a6 slatex: copy "slatex.sty" to the "lib" directory 2013-07-10 12:57:02 -06:00
Matthew Flatt
4a45d5faa0 look for default preferences file in the configuration directory
... instead of a "defaults" collection.
2013-07-10 12:57:02 -06:00
Matthew Flatt
39dd0bb3be fix `syntax/boundmap', too
Related to PR 13911
2013-07-10 12:57:02 -06:00
Matthew Flatt
2a4f32d853 remove core dependency on `mzlib/restart' 2013-07-10 12:57:02 -06:00
Matthew Flatt
8d3c09b38b move compile-file' to compiler/compile-file'
The `mzlib/compile' module re-exports the moved function.

Also, fix `make-directory*' so that it never fails on an existing
directory. Remove `unstable/file', since it was just the same
clean-up of `make-directory*'.
2013-07-10 12:57:02 -06:00
Matthew Flatt
72c9162989 move mzscheme' and mzlib/unit200' from core to "compatibility-lib"
Also, move `mzlib/sandbox' to "compatibility-lib".
2013-07-10 12:57:02 -06:00
Matthew Flatt
a6e25f0bae file/gzip: remove use of `unit200'
The unit was just there to create an instantiable local definition
context. In modern Racket, a function body does the same job.
2013-07-10 12:57:02 -06:00
Matthew Flatt
85899c7236 ".plt" unpacking: require literal S-expression pattern
A literal S-expression is required instead of an S-expression that
is evaluated. Any ".plt" file created in the normal way will still
work.
2013-07-10 12:56:22 -06:00
Sam Tobin-Hochstadt
43a56968a1 Fix file tests for contract test split. 2013-07-10 14:48:45 -04:00
Sam Tobin-Hochstadt
dae7311a76 Fix Travis tests for contract and db test splits. 2013-07-10 14:48:45 -04:00
Robby Findler
4e3d6219d9 remove contract-test.rktl from all.rktl (and thus quiet.rktl) 2013-07-10 13:28:11 -05:00
Carl Eastlund
2ac3e77c4c Tests for the #:fallbacks option to define-generics. 2013-07-10 12:56:16 -04:00
Carl Eastlund
c6532131a0 Added a #:fallbacks option to define-generics.
The #:fallbacks option specifies a set of method definitions.  Each definition
is used for any value that does not support the specific method.  Like
allows define/generic and absent method definitions.  If neither a specific
implementation or the #:fallbacks clause defines a given method, the normal
runtime error is raised.  The #:defined-table option reports whether a value's
specific implementation supports a method; the presence of a #:fallbacks
implementation for a method does not change this result.
2013-07-10 12:56:16 -04:00
Carl Eastlund
fc4c8dd53e Added a test for define/generic's interaction with marks.
Specifically, in the test, the bound name and the method name have marks on them
that are different from each other and from the original method names in the
enclosing generics group.
2013-07-10 12:56:16 -04:00
Carl Eastlund
886d8ce272 Added tests for the behavior of generic methods.
Specifically, with the reorganization of racket/private/generic, different
method signatures (sets of required and optional, positional and keyword
arguments) exercise different paths in the code, at phases 0 and 1.  The tests
therefore include a variety of different method signatures.
2013-07-10 12:56:16 -04:00
Carl Eastlund
7ab8aca79b Adapted define-generics so that "defaults" work like #:methods implementations.
Specifically, implementations for the #:defaults keyword in define-generics can
now use define/generic to get at the generic implementation of a method for
which a specific implementation is defined locally.  Also, unimplemented methods
are handled properly now in #:defaults.  Previously, an unimplemented method in
a #:defaults specification would go into an infinite loop if applied, because
the implementation for the specific type wound up referring to the generic
implementation of the method.

A lot of the back-end implementation of generics changes in this commit:

- The new module racket/private/generic-methods provides a uniform mechanism for
  defining method tables and recording static information about generics
  groups.  Both #:methods in [define-]struct and #:defaults in define-generics
  use this framework now.  In addition, generics based on existing properties
  such as gen:stream, gen:equal+hash, and gen:custom-write now use the struct
  from this module to store the names associated with the generics groups.

- Generic methods now expand directly into functions with the appropriate arity,
  and refer directly to the appropriate argument to perform generic method
  dispatch.  The previous implementation used procedure-reduce-keyword-arity to
  restrict the arity dynamically, and used list-ref to find the generic
  argument.

- Some error messages have changed slightly; hopefully for the better, but this
  change did require some changes to tests for specific error messages.
2013-07-10 12:56:16 -04:00
Carl Eastlund
d3d67c5978 Added tests for "default" generic method implementations to work like #:methods.
Specifically, it should be possible for a "default" implementation to have
unsupported methods, and to use define/generic.
2013-07-10 12:56:15 -04:00
Carl Eastlund
6e01d1d9a3 Separated generic contracts from define-primitive-generics.
Now the primitive generics form just defines generics with their properties and
methods, and the surface-level form calls the contract definition form
directly.  This means the primitive generics form now requires an explicit name
for a struct property accessor, so that the same name can be used for the
contract.
2013-07-10 12:56:15 -04:00
Carl Eastlund
00ccb5850b Renamed private version of define-generics to define-primitive-generics. 2013-07-10 12:56:15 -04:00
Carl Eastlund
8c00abbf48 Removed #:prop-defined-already? option from private define-generics macro.
In the few cases that used this option, the only definition needed from the
private define-generics macro was gen:<name>.  This is easy to define directly
without using the macro, so I have changed the code to do so and avoid redundant
definitions of methods.
2013-07-10 12:56:15 -04:00
Carl Eastlund
b9f2e4d541 Documented the new argument order accepted by define-generics. 2013-07-10 12:56:15 -04:00
Carl Eastlund
065622d64b Added tests for varying the order of keyword options to define-generics. 2013-07-10 12:56:15 -04:00
Carl Eastlund
c5760b5ed1 Keyword arguments to define-generics can be in any order, before/after methods. 2013-07-10 12:56:15 -04:00
Carl Eastlund
21f4377305 Fixed a typo: part of define-generics's documentation was in the wrong scope. 2013-07-10 12:56:15 -04:00
Robby Findler
bb616ae1e9 contract test suite post-breakup misc cleanups 2013-07-10 08:54:56 -05:00
Matthew Flatt
ceb6ea7d06 games docs: fix an absolute-path problem 2013-07-10 07:27:49 -06:00
Matthew Flatt
5c80084f68 change `find-relative-directories' to normalize completed paths
Avoids problems with clients (like the Scribble part of `raco setup')
that compare paths.
2013-07-10 07:10:39 -06:00
Matthew Flatt
fe98a80c22 add `identifier-bindig-symbol'; fix free-id-table for renames
The implement of `free-id-table' uses `identifier-binding'
to decide on a symbolic name as a key for each identifier,
but `identifier-binding' doesn't provide enough information
for local and top-level bindings. The new `identifier-binding-symbol'
function provides that information.

Closes PR 13911
2013-07-10 07:10:39 -06:00
Eli Barzilay
46db1d2d64 Explain how to build the pages. 2013-07-09 21:01:59 -04:00
Eli Barzilay
41c0156fe3 Delay running git, to avoid a premature warning about $GIT_DIR. 2013-07-09 21:01:59 -04:00
Eli Barzilay
8b7a9c6b9e Allow multiple extra files. 2013-07-09 21:01:59 -04:00
Eli Barzilay
90b0f262cd Improve some texts. 2013-07-09 21:01:58 -04:00
Robby Findler
cc35d5d7e1 remove dependency on racket/match 2013-07-09 18:39:34 -05:00
Vincent St-Amour
f57774de83 Move typed-racket-more to typed-racket-pkgs. 2013-07-09 18:26:39 -04:00
Vincent St-Amour
a41bbd78b5 Document contract-continuation-mark-key. 2013-07-09 18:26:39 -04:00
Asumu Takikawa
54cea00f4f Switch two type errors to internal errors
One of these was broken and falling into that case would
raise a random runtime error anyway.
2013-07-09 18:25:56 -04:00
Robby Findler
bd5b7ea85b add myself to the email notification 2013-07-09 16:59:54 -05:00
Robby Findler
86778598d4 break contract-test.rktl into 51 files
(plus one new file to act as a driver for
running the whole test suite)

Beyond the obviousness of this cleanup, it also helps me
test the contract system without having to load any code
that depends on it (making the test cases far more useful
when I'm breaking low-level parts of the contract system
(like ->))
2013-07-09 15:58:02 -05:00