Commit Graph

25020 Commits

Author SHA1 Message Date
Vincent St-Amour
f11861f60a Have method definitions be its own keyword in the struct form.
Struct properties are hidden from users.
2012-05-24 16:51:08 -04:00
Vincent St-Amour
3bfaa2b00b New naming convention for generics names. 2012-05-24 16:51:07 -04:00
Asumu Takikawa
f866e34b26 Expand documentation on sequence/stream extension 2012-05-24 16:51:06 -04:00
Vincent St-Amour
08cd358300 Add iterators as tests for generics.
Equivalent to streams, so not useful to provide.
2012-05-24 16:50:46 -04:00
Asumu Takikawa
ec2563fdd3 Add comment about coerce-method-table 2012-05-24 16:50:45 -04:00
Vincent St-Amour
1a42772c02 props 2012-05-24 16:50:45 -04:00
Asumu Takikawa
3a93df5566 Use racket/generics for extensions to racket/stream 2012-05-24 16:50:44 -04:00
Vincent St-Amour
0b0473d228 Allow generics to be attached to existing struct properties. 2012-05-24 16:50:44 -04:00
Vincent St-Amour
991cb5f371 Hide #:coerce-method-table from the public generics API. 2012-05-24 16:50:43 -04:00
Vincent St-Amour
8997379f35 Split interface and implementation of the generics library. 2012-05-24 16:50:43 -04:00
Vincent St-Amour
d5de436b9c Add a pointer to generics in the struct property docs. 2012-05-24 16:50:42 -04:00
Vincent St-Amour
448ad27a37 Move generics to racket/generics.
After discussion with Eli.
2012-05-24 16:50:42 -04:00
Vincent St-Amour
1180a95c60 props 2012-05-24 16:31:32 -04:00
Vincent St-Amour
e7e66ce41c Implement coercion for method tables.
For backwards compatiblity, method tables can be generated from old APIs.
2012-05-24 16:31:32 -04:00
Vincent St-Amour
a68242e4eb Implement ordered dicts in terms of generics. 2012-05-24 16:31:32 -04:00
Vincent St-Amour
17bb9073b9 Document new dict extensibility API. 2012-05-24 16:31:32 -04:00
Vincent St-Amour
ff416ca2ac Remove dead code in racket/private/dict. 2012-05-24 16:31:32 -04:00
Vincent St-Amour
1ec2bc0ea4 Add tests for generics. 2012-05-24 16:31:31 -04:00
Vincent St-Amour
c29a65485e Update generic docs to explain the optional defined-table argument. 2012-05-24 16:31:31 -04:00
Vincent St-Amour
36980c262f unstable/generics: define-methods' -> methods'
`define-methods' is a bad name for an expression form.
2012-05-24 16:31:31 -04:00
Asumu Takikawa
e4a3001af6 Reimplement racket/dict using generics. 2012-05-24 16:31:31 -04:00
Asumu Takikawa
e3b7640528 Let provider of generics check if a method exists
This change adds an additional argument to define-generics
that binds a procedure to check if a given method is defined
for an instance of the generic.
2012-05-24 16:25:09 -04:00
Asumu Takikawa
518bf0fd30 Move unstable/generics to generics. 2012-05-24 16:25:09 -04:00
Eli Barzilay
a3ad719b52 Leftover file that wasn't added with the `tests/profile' refactoring. 2012-05-24 11:53:03 -04:00
Eli Barzilay
8fc49d41cf Improved bash completion script.
Warning: I tried a bunch of things and it looks like it works, but I'm
not using bash regularly so there might be some problems in this.
Committing by request of the bashers.

It would still need some work to make it work as (I think) was intended.
For example _find_exe() should be used to find the current executable
when completing, but it's used at the toplevel.
2012-05-24 11:48:35 -04:00
Eli Barzilay
6260b4c239 Streamline more test suits. 2012-05-24 11:27:13 -04:00
Eli Barzilay
482214e053 Skip some "tests/*/main.rkt" in drdr.
These files are invoking tests that are implemented in other files.
2012-05-24 10:52:00 -04:00
Eli Barzilay
f55eba70c0 Just have string-replace' now, with an #:all?' keyword (defaulting to #t). 2012-05-24 10:40:20 -04:00
Eli Barzilay
37a1c0af91 Add string-replace' and string-replace*'.
Committed as a checkpoint, since I convinced myself that a single
function with a keyword is better, given that the rest of the simplified
functions operate on the whole string.
2012-05-24 10:40:20 -04:00
Eli Barzilay
784857e9fa Add `string-split'. 2012-05-24 10:40:20 -04:00
Eli Barzilay
dcf2754a57 Clarify `regexp-split' on an empty input.
The text that says that (regexp-split #rx"whatever" "") returns '("")
rather than '() is

  If `input' contains no matches [...] the result is a list containing
  input’s content [...] as a single element.

This is a little implicit, if you consider such an input as having
nothing left to match over so it's as if there is no input (with a port
this confusion is a little clearer).

Clarify with an example in the docs, and also add tests.
2012-05-24 10:40:20 -04:00
Eli Barzilay
6318df82e5 Drop the now-redundant " " argument from existing uses of `string-join'. 2012-05-24 10:40:20 -04:00
Eli Barzilay
29beae55c1 Redo string-trim' and string-normalize-spaces'.
This is following the mailing list discussion.  In addition get
`string-join' more in-line with these by making its `sep' argument
default to a space.
2012-05-24 10:40:20 -04:00
Asumu Takikawa
abf9223203 TR: Fix type-checking of hash literals. 2012-05-23 15:49:38 -04:00
Asumu Takikawa
94545a7cd7 Fix doc breakage.
`abstract` from racket/class conflicted with `abstract`
in scribble paper modules.
2012-05-22 19:55:44 -04:00
Asumu Takikawa
9400432903 Fix class construction bug introduced by abstracts
Merging changes with interface contracts introduced
a bug due to a missing argument to class-make.
2012-05-22 18:34:45 -04:00
Asumu Takikawa
150548dc78 Better error message for abstract classes. 2012-05-22 16:00:54 -04:00
Asumu Takikawa
f4f6f8c52c For abstracts, the super method just calls void.
Since mixins rely on super calls to possibly abstract
methods, we want to ensure that the super call will not
error when it gets to an abstract method. However,
external method calls should still raise an error for
abstract methods.
2012-05-22 16:00:42 -04:00
Asumu Takikawa
11c589af31 Put dummy method for abstracts in the right place.
Also, the dummy method should be variadic.
2012-05-22 16:00:41 -04:00
Asumu Takikawa
6059c51b56 Don't allow internal names for abstract methods. 2012-05-22 15:59:17 -04:00
Asumu Takikawa
b50a2c7518 Add documentation for abstract clause. 2012-05-22 15:59:16 -04:00
Asumu Takikawa
ef3abb3a72 Add tests for abstract methods. 2012-05-22 15:59:16 -04:00
Asumu Takikawa
06091079b1 Add abstract methods to the class system. 2012-05-22 15:58:26 -04:00
Asumu Takikawa
be9faeac65 Minor fix in Guide section on contracts
Reported by Shambles
2012-05-22 10:50:46 -04:00
Matthew Flatt
9bdb47bba0 racket/draw: fix bad interaction of path drawing and gradient brushes 2012-05-22 06:20:54 -04:00
Matthew Flatt
5962e542f7 slideshow: add `slide->pict' 2012-05-22 06:20:54 -04:00
Stevie Strickland
1eec136c3f Use coerce-contract when building interfaces with contracts. 2012-05-21 16:32:17 -04:00
Sam Tobin-Hochstadt
952af2fa2d Add \bot as alias for \perp in DrRacket (both are supported in LaTeX). 2012-05-21 15:55:07 -04:00
Kevin Tew
83c26eef4b [Distributed Places] a few of Eli's documentation suggestions 2012-05-20 22:50:58 -06:00
Matthew Flatt
562fa3c6b9 add some missing acks 2012-05-20 21:15:06 -06:00