Commit Graph

34548 Commits

Author SHA1 Message Date
Mike Sperber
fa64870b78 Synch German string constants with latest. 2014-10-25 14:47:40 +02:00
Asumu Takikawa
6ad017a1e9 Fix init order of choice%'s type 2014-10-24 15:33:52 -04:00
Greg Hendershott
9de70551dc Fix bug with equal? on small bit-vectors. 2014-10-24 15:28:25 -04:00
Vincent St-Amour
c389bfab3b Fix set-symmetric-difference docs. 2014-10-24 13:07:25 -04:00
Matthew Flatt
14f984ba63 distro-build: try connecting a few times to let a VM warm up
This strategy has been successful for the package-build service,
and it will hopefully cut down on spurious snapshot build failures
that happen when a VM's networking doesn't start up quickly enough.
2014-10-24 08:27:50 -06:00
Matthew Flatt
2e327d7886 Mac OS X .pkg installer: check for target folder before installing
If the target folder exists, let the user know and give up. (This
seems safer than trying to delete the folder, since there might be
other files in the folder than the original files, and the installer
doesn't currently keep a list of installed files.)
2014-10-24 08:01:15 -06:00
Asumu Takikawa
17cafe652e Avoid computing type tooltips twice
The logging code in tc-toplevel.rkt is sufficient to get
all the type tooltips.
2014-10-24 01:00:30 -04:00
Asumu Takikawa
5138614aba Fix checking of (list ...) w/ union expected type
Closes PR 14758
Closes PR 14747
2014-10-23 23:01:28 -04:00
Matthew Flatt
f79ac7b510 Scribble HTML: included needed tag prefixes in "Link to this section" 2014-10-23 10:27:24 -06:00
Matthew Flatt
fb75dcd38d unix-installer test: check "natipkg" 2014-10-23 10:27:24 -06:00
Robby Findler
58662d2208 generalize rule-pict-style to allow more customization of reduction-relation layouts 2014-10-23 09:50:46 -05:00
Asumu Takikawa
375abf3c2b Simplify TR class macro handling of names
Instead of using a syntax-property hack, just disarm the
expanded syntax (TR will do this later in the pipeline anyway).
2014-10-23 00:48:05 -04:00
Asumu Takikawa
9e242fbaef Export disarm* with protect-out 2014-10-23 00:47:41 -04:00
Asumu Takikawa
670c857685 Fix typed private class fields with functions
A public method definition and a private field that contains
a function are hard to distinguish without traversing the entire
class body, which caused TR to fail to detect the private field
case. TR now uses more compile-time state to precisely
distinguish the cases.

Also fixes a related bug in which TR would incorrectly handle
multiple private fields defined with a single `define-values`.

Closes PR 14788
2014-10-23 00:20:07 -04:00
Matthias Felleisen
a70ece0bb0 typo, thanks Jack Clay 2014-10-22 22:41:28 -04:00
Matthew Flatt
1f764a3dba fix internal meta-continuation comparison for continuation sharing
The check that the current meta-continuation matches the captured one
would always fail (I think), since the current meta-continuation is
pruned on capture. Keep a weak link to the original meta-continuation
to enable detection of capturing a continuation that matches or
extends one that was previously captured.

Enabling sharing exposed a problem with the code that saves
continuation marks for partial sharing, since that implementation
became out of sync with the main implementation (so merge the
implementations).
2014-10-22 13:14:58 -06:00
Vincent St-Amour
9c30da7682 Prune argument types too in error messages.
Closes PR 12907.
2014-10-22 13:58:42 -04:00
Matthew Flatt
d9f2a84951 repairs for {impersonator,chaperone}-struct
Commit 0b71b8481d didn't have the tests that I thought I had
written, and so the changes were unsurprisingly buggy.
2014-10-21 21:09:36 -06:00
Matthias Felleisen
2d422da25a fixing error message 2014-10-21 22:54:11 -04:00
Robby Findler
e589f591fb take advantage of the new impersonator support to hack in something that
avoids piling up redundant instanceof/c contracts

This is not a general purpose solution, but instead a hack that covers
certain hopefully likely patterns of redundant contracts for objects.

This commit looks for redundant contracts according in a slightly more
general pattern than just "is the most recently attached contract
stronger than the one I'm about to put on here and does it have the
same blame labels?", because that predicate isn't good enough to cover
the example below. In the example below, we repeatedly get the same
contract put on an object, but with different blame labels. So we need
to drop "inner" contracts. That is, when we have two contracts on
there and we go to add the third, we can tell that the second one
would no longer ever signal blame, so we can keep just the first in
the third.

More concretely, if we had these two contracts on 'v' with the given
blame labels (higher lines means the contract is "outside" or applied
later and the blame labels are in positive/negative order):

  (-> x y)  <c,d>
  (-> x y)  <a,b>

then the two possible blames we get here are blaming d for a non-x
argument and blaming a for a non-y result. And now lets say we add a
third contract to the stack that's a copy of the first, but possibly
with different blame labels:

  (-> x y)  <e,f>
  (-> x y)  <c,d>
  (-> x y)  <a,b>

Now we can blame f for non-x argument and a for a non-y result, both
of which are things covered by the first and third contract, so we can
safely drop the middle one and use this stack:

  (-> x y)  <e,f>
  (-> x y)  <a,b>

The example above is couched in terms of arrow contracts, but this
commit doesn't do this for arrow contracts, it does it for
instanceof/c contracts.

And also the way that we tell that the inner contract is redundant
isn't that it is equal; instead we use contract-stronger?. In
particular, the above reasoning works, I believe, when we have that
the inner contract is stronger than the one we're removing and when
the outer contract is also stronger than the one we're
removing. That's the check that actually happens in the code.

-------

The code below is the example below is an example Asumu sent me (but
with the TR parts stripped out). Before this commit, the contract
wrapping grows without bound, but with this commit it stays constant.

In the example below we get only two different sets of blame labels
(and equal contracts) and thus are actually more contracts that could
be eliminated, but this commit does limit it to just two contracts. (I
think it could be alternating between one and two contracts instead of
always two if the code that dropped the contracts were more clever.)

 #lang racket/base
(module State racket/base
  (require racket/contract racket/class)

  (define state/c
    (recursive-contract
     (class/c
      [m (-> any/c (instanceof/c state/c))]
      [n (-> any/c (instanceof/c state/c))])))

  (define state%
    (class object%
      (super-new)
      (define/public (m) (send this n))
      (define/public (n) (new state%))))

  (define (tree-next o) (send o m))
  (define (make-tree) (new state%))
  make-tree
  (provide
   (contract-out
    [tree-next (-> (instanceof/c state/c) (instanceof/c state/c))]
    [make-tree (-> (instanceof/c state/c))])))

(require (submod "." State))
(require racket/sandbox)
(with-limits #f
             100
             (let loop ([o1 (make-tree)] [n 0])
               (printf "~a\n" n)
               (define o2 (tree-next o1))
               (loop o2 (add1 n))))
2014-10-21 20:12:26 -05:00
John Clements
74efd8394a updated HISTORY.txt
merge to 6.1.1 release
2014-10-21 14:39:32 -07:00
Matthew Flatt
a6102229aa unstable/options: fix for chaperone-struct change
Contrary to the comment for 0b71b8481d, the `unstable/options`
implementation used the first argument to a mutator wrapper.
Adjust to close over the wrapped value.
2014-10-21 14:00:43 -06:00
Matthew Flatt
8a45f9d341 impersonated mutator: fix internal stack overflow
This is not a new bug, but it was exposed by the interaction
of the changed to the impersonated-mutator protocol and
the `unstable/option` test suite.
2014-10-21 13:53:09 -06:00
Spencer Florence
d81f09d11e change typeset-code to conform to text:color<%>'s interface
The `typeset-code` function assumed that a lexeme must be `eof` on an
end-of-file, but `test:color<%>` allows it to be anything. Instead,
the check should be on type as 'eof.
2014-10-21 12:46:14 -06:00
Robby Findler
9d863ca2fe fix small mistake in the docs 2014-10-21 13:11:43 -05:00
Kat Lyons
f54ea70ae0 Fix documentation error in net/sendurl 2014-10-21 10:17:45 -06:00
noryb009
76e68be818 Add %F to drracket desktop file 2014-10-21 10:16:49 -06:00
Eli Barzilay
e52f273491 Prevent irregular real numbers from being treated as valid JSON values.
Fixes PR 14628.
2014-10-21 10:15:36 -06:00
Martin DeMello
bc5d86f494 Add a disposal arg to write-animated-gif 2014-10-21 10:14:21 -06:00
Matthew Flatt
1f4edfd0f6 fix doc typo 2014-10-21 10:08:00 -06:00
Matthew Flatt
0b71b8481d {impersonator,chaperone}-struct: change protocol to receive self
When calling a wrapper procedure for a field accessor or mutator,
provide the structure that was originally passed to the accessor or
mutator, instead of the value that was wrapped to create an
impersonator.

This is a backward-incompatible change, but I can't find any uses of
that initial argument to the wrapper procedure. Also, a wrapper can
capture the original value in its closure, while passing "self" allows
wrappers that are sensitive to overridden impersonator properties.
2014-10-21 10:05:02 -06:00
Matthias Felleisen
923a785867 improved fix, Matthew's suggestion
please merge into 6.1.1
2014-10-21 12:09:36 -04:00
Vincent St-Amour
22d9e36150 Fix tabular to satisfy table's contract. 2014-10-21 12:01:27 -04:00
Matthias Felleisen
3568db5f4f improve error message 2014-10-21 11:06:40 -04:00
Matthias Felleisen
4624a99420 make to-draw (alt-kw) error messages more correct, see test for flaws; closes PR 14781
please merge with 6.1.1
2014-10-21 11:06:40 -04:00
Asumu Takikawa
200f1cdb45 Add contracts and omit an unused definition 2014-10-21 10:14:50 -04:00
Asumu Takikawa
dc578cdbc0 Greatly reduce size of class static contracts.
This helps generate contracts for GUI classes using less
time and memory.
2014-10-21 10:14:50 -04:00
Asumu Takikawa
608dfcf335 Use a new approach to generating Name contracts
This handles contract generation for recursive or
mutually recursive Name types in the static contract
framework.

Instead of just generating recursive-sc static contracts,
it memoizes the recursive contract within a single
type->contract call by indirecting through a table.

When static contracts are instantiated, the table is
consulted for computing contract kind information and for
generating the actual contracts for the recursive names.
2014-10-21 10:14:50 -04:00
Asumu Takikawa
3d4f7906c8 Add a test for generating GUI contracts for TR 2014-10-21 10:14:49 -04:00
Matthew Flatt
99832efb45 openssl: fix ssl-load-default-verify-sources! for Win64
Closes PR 14784

Merge to v6.1.1
2014-10-21 07:33:11 -05:00
Matthew Flatt
e019583acc Inside Racket: document Windows-specific treatement of "UTF-16" 2014-10-21 07:31:08 -05:00
Matthew Flatt
13f5aa240c pkg manage docs: clairfy in overview that a git repo tag is allowed 2014-10-21 07:31:07 -05:00
Matthew Flatt
c15422b577 correct register-finalizer docs by clarifying prohibitions 2014-10-21 07:31:07 -05:00
Matthew Flatt
3323605fa9 racket/udp: adjust receive into a zero-sized buffer
The OS doesn't necessarily react to a zero-sized buffer the way
that `udp-receive!` is supposed to work, so provide only a
non-zero-sized buffer to the OS.
2014-10-21 07:31:07 -05:00
Matthew Flatt
95b083165c syntax-color/racket-lexer: fix problem with unclosed "| "
... where the whitespace character after "|" is non-ASCII.

This bug was found by random testing in `syntax-color/lexer-contract`.
2014-10-21 07:31:07 -05:00
Matthew Flatt
a1bac35b60 syntax-color/lexer-contract: make random-test failure declare itself
Random tests that are implciitly injected into a program should
declare themselves as such when they fail. Otherwise, random
crashes are really confusing.
2014-10-21 07:31:07 -05:00
Matthew Flatt
66729a4473 raco test: show more of stderr on failure 2014-10-21 07:31:07 -05:00
Matthew Flatt
53cbb8b03a raco test: fix -l 2014-10-21 07:31:07 -05:00
Asumu Takikawa
3b006df29d Fix TR docs on #:implements in Class types
Please merge to v6.1.1
2014-10-21 00:57:46 -04:00
Asumu Takikawa
2bad36a6a1 Fix Guide typo
Please merge to v6.1.1
2014-10-21 00:40:33 -04:00