Commit Graph

30091 Commits

Author SHA1 Message Date
Matthew Flatt
afe8c37a2a user paths depend on name (not always version); no `shared' pkg scope
An installation has a name (via the configuration file "config.rktd")
that defaults to the version string. The name, instead of the
Racket version, is used for forming the path to the user "collects"
directory, user packages, and so on. The `user' package scope is
thus user- and installation-name-specific (instead of user- and
version-specific).

Remove `shared' package and link scope, since the notion of
installation names generalizes the concept (a set of installations
can be given the same name) and fits it into `user' scope.
2013-07-26 11:52:47 -06:00
Matthew Flatt
e0bab441a8 fix `get-output-{bytes,string}' with bad starting index, no ending index
Closes PR 13933
2013-07-25 20:39:57 -06:00
Asumu Takikawa
868e6b97b7 Add TR Guide section on typed-untyped interaction
Related to PR 13869
2013-07-25 21:26:18 -04:00
Asumu Takikawa
a847f5c11a Fix contract on editor interface
The documented contracted inaccurately described what
the actual code had implemented.
2013-07-25 17:25:48 -04:00
Asumu Takikawa
449afdc00d Add examples for most evt bindings 2013-07-25 16:40:30 -04:00
Asumu Takikawa
894c492434 Fix evt typo 2013-07-25 15:57:51 -04:00
Asumu Takikawa
98b1f8189d Fix typo in reference 2013-07-25 15:31:28 -04:00
Carl Eastlund
08ae925408 Documented forms for generic instance chaperones, impersonators, and contracts. 2013-07-25 13:49:00 -04:00
Carl Eastlund
2f473c2403 Added tools for contracts, impersonators, and chaperones for generic interfaces.
Added four macros to racket/generic:
- chaperone-generics
- impersonate-generics
- redirect-generics (dynamically chooses between the above two)
- generic-instance/c
All take pairs of method names and wrappers (procedures or contracts),
and turn those into appropriate chaperone, impersonator, or contract wrappers
on the method tables of the given structs.

Used this to rewrite set/c to give better error messages.
2013-07-25 13:49:00 -04:00
Carl Eastlund
6b337efd2f Changed "generics group" to "generic interface" in errors and documentation. 2013-07-25 13:49:00 -04:00
Carl Eastlund
73071e6b87 Documented changes to racket/set.
Added documentation gen:set and reorganized documentation to set aside functions
that are methods of gen:set.  Documented new mutable, weak, and custom set
types.  Documented new methods for mutating sets.
2013-07-25 13:49:00 -04:00
Carl Eastlund
6c676cf484 Documented changes to racket/dict.
Reorganized the documentation with a separate subsection for gen:dict methods,
split into primitive and derived depending on whether they have fallback
implementations.  Added the new methods dict-empty?, dict-copy, dict-clear, and
dict-clear!.  Documented dict-supports?, dict-support/c, make-custom-hash-types,
and define-custom-hash-types.
2013-07-25 13:49:00 -04:00
Carl Eastlund
d405b23b70 Documented new options for define-generics.
Added documentation for #:fast-defaults, #:fallbacks, and #:defined-predicate.
Also documented #:defined-table as deprecated in favor of #:defined-predicate,
and touched up other parts of the documentation, mostly by reordering.
2013-07-25 13:49:00 -04:00
Carl Eastlund
0cbc20a2b8 Added tests for mutable, weak, and custom sets. 2013-07-25 13:49:00 -04:00
Carl Eastlund
a651591a15 Added gen:set, mutable and weak sets, and custom set types.
Sets are now implemented as a generic interface, and lists count as sets.  Most
of the set functions have been added as methods, including mutable versions of
imperative update methods.
2013-07-25 13:49:00 -04:00
Carl Eastlund
da1fe888a7 Added dict-copy operation; renamed dict-supports(?|/c) to dict-implements(?|/c).
Similar to hash-copy or string-copy, dict-copy creates a new, mutable copy of
the given dictionary.  Added as a method of gen:dict.
2013-07-25 13:48:59 -04:00
Carl Eastlund
5c1728dce4 Added define-custom-hash-types and make-custom-hash-types.
The definition form and function consume an equality predicate and optional hash
code functions and key predicate, and produce predicates and constructor
functions for hash table-based dictionaries using the given equality and hash
functions.  Immutable, mutable, and weak dictionaries are defined.
2013-07-25 13:48:59 -04:00
Carl Eastlund
81bcd73aa7 Extended the gen:dict interface; also added some dict and hash operations.
- Added hash-empty?, hash-clear, and hash-clear! for hash tables.
- Added dict-empty?, dict-clear, and dict-clear! for dictionaries.
- Made all dict functions exported by racket/dict into generic methods; turned
  the existing implementations into fallbacks.
2013-07-25 13:48:59 -04:00
Carl Eastlund
97b78ace5b Added #:dispatch option for clauses in #:defaults and #:fast-defaults.
The #:dispatch option specifies a second, less strict predicate for a #:defaults
or #:fast-defaults clause.  The main predicate is still used for the generics
group's type predicate, but the dispatch predicate is used in choosing which
method implementation to use.  The #:dispatch option is useful when the dispatch
predicate is disjoint from all other instances, is significantly cheaper to run
than the main predicate, and the full checks can be meaningfully deferred in
method implementations.

Specifically, this is useful in the implementation of iteration for
association-list dictionaries.  The dict-iterate-{next,key,value} functions do
not need to test (andmap pair? dict) if the given dict is eq? to the one stored
in the given iterator.  The dispatch predicate, list?, is much cheaper.
2013-07-25 13:48:59 -04:00
Carl Eastlund
d9890b843a Changes to define-generics: added #:defined-predicate; improved generated code.
The #:defined-predicate option is like #:defined-table, but it defines a
two-argument predicate that only processes the requested method name and doesn't
allocate a hash table each time it is called.

Method implementations provided via #:fallbacks, #:defaults, and #:fast-defaults
are now called directly by method procedures rather than stored in a vector and
extracted by index.  This should hopefully improve inlining for methods.
2013-07-25 13:48:59 -04:00
Carl Eastlund
1f267d479c Added #:fast-defaults option to define-generics.
For datatypes that are disjoint with structs that might implement the generic,
this adds a "fast path" implementation that doesn't need to test for struct
properties.
2013-07-25 13:48:59 -04:00
Carl Eastlund
7deb4ad025 Separated prop:dict from gen:dict.
This work is in preparation for widening the interface of gen:dict with
operations like dict-for-each, dict-update, etc., each with a fallback
implementation.  The property prop:dict, with its documented, fixed-length
vector representation, cannot be extended, whereas a generic with optional
methods can be.
2013-07-25 13:48:58 -04:00
Carl Eastlund
f7f15e1113 Added a #:derive-property option to define-generics.
The define-generics form can now derive existing struct properties, so that any
instance of the new generics group is also an instance of the struct property.
2013-07-25 13:48:58 -04:00
Matthew Flatt
a5d724dda4 file/tar: limit pipe size between tar and gzip
Otherwise, tar is likely to get ahead of gzip and use much
more memory.
2013-07-25 10:11:05 -06:00
Matthew Flatt
949ea16cbf distro-build: improve failure reporting 2013-07-25 10:06:41 -06:00
Eric Dobson
265603ed69 Make Bottom generalize to Any instead of Integer. 2013-07-23 23:49:51 -07:00
Eric Dobson
5d2c9a67e8 Make tc-literal deal with complicated expected types better.
Also fixes bug in literal heterogeneous vector typing.

Closes PR 13842.
2013-07-23 22:33:31 -07:00
Eric Dobson
e75f3dea7a Make breaks actually break out of running all the TR tests. 2013-07-23 22:33:31 -07:00
Eric Dobson
6195de66a6 Make for: not allow multiple annotations. 2013-07-23 22:33:31 -07:00
Matthew Flatt
aeb3372faf more safe-dereference repairs for DWARF native stack trace (on ARM) 2013-07-23 20:38:23 -06:00
Matthew Flatt
a31e9b29e0 no dprintf() macro in libunwind to avoid collisions on some platforms 2013-07-23 19:59:00 -06:00
Matthew Flatt
245a688c2e fix for inotify() use with places and futures disabled 2013-07-23 19:46:10 -06:00
Matthew Flatt
9f0c5b1487 fix x86_64 DWARF-based stack trace
Commit 5917d4c added a guard on some pointer dereferences, but
the guard is too strict for DWARF. Allow reading of TEXT segments,
etc.
2013-07-23 17:20:20 -06:00
Asumu Takikawa
b27f2217c9 Increase timeout & set random prop on generics benchmark 2013-07-23 14:56:00 -04:00
John Clements
beae23fea2 Oops don't mention file reorg in stepper HISTORY.txt
Please merge to 5.3.6 release
2013-07-23 14:08:41 -04:00
John Clements
b23d8ed2b4 updated HISTORY
Merge to 5.3.6 release.
2013-07-23 13:37:08 -04:00
Sam Tobin-Hochstadt
d40e7ac4c4 Re-enable reasonable Travis setup. 2013-07-23 00:27:50 -04:00
Sam Tobin-Hochstadt
9f659c7df3 Add comment. 2013-07-23 00:06:02 -04:00
Matthew Flatt
cba5bb7729 distro-build: allow missing "man" directory (for Windows) 2013-07-22 21:15:41 -06:00
Carl Eastlund
7d1e0d4332 Added a benchmark file for performance of gen:dict and gen:stream generics. 2013-07-22 22:24:18 -04:00
Carl Eastlund
e6d2e2e6c2 Avoid extraneous output from tests/generic/fallbacks. 2013-07-22 22:24:18 -04:00
Carl Eastlund
59ee9a227e Improved the error messages from generic interface contracts.
Previously, a failure during the first-order checks would print out the name of
the full contract for all the methods, while describing the value for just one
method.  This is both misleading, and incredibly verbose.  The new version
prints out just the relevant contract.
2013-07-22 22:24:18 -04:00
Carl Eastlund
a3c2d25d4f Removed the false statement that all dictionaries are two-valued sequences. 2013-07-22 22:24:17 -04:00
Matthew Flatt
0eb29a4dcf fix `raco setup' package-dependency check when PLaneT package is installed 2013-07-22 18:32:40 -06:00
Matthew Flatt
5457f72391 show package for each module in documentation
The package is normally determined automatcially, but
the `defmodule' form also supports a `#:packages' option.
2013-07-22 18:32:39 -06:00
Matthew Flatt
5d35d63ec5 quick: fixup for slideshow' vs. pict' 2013-07-22 16:42:19 -06:00
Matthew Flatt
f85221afca adjust ".plt" S-expression matching to accept more old archives 2013-07-22 16:34:21 -06:00
Matthew Flatt
682916c8fe raco pkg show: include only non-auto by default 2013-07-22 16:20:14 -06:00
Matthew Flatt
92f2d7d386 remove bogus cross-phase-persistent declaration
Also fix and improve source-location reporting.
2013-07-22 15:31:18 -06:00
Matthew Flatt
3e53fd3a93 create "man1" directory before trying to put a man page there 2013-07-22 14:22:26 -06:00