Commit Graph

38480 Commits

Author SHA1 Message Date
Eric Dobson
76c3ec443f Remove ability to check unreachable code.
If code is unreachable then looking up any variable should return
Bottom. But implementing checking unreachable code that way is not that
useful.
2014-06-14 11:40:05 -07:00
Robby Findler
151e4cfac4 add missing guard 2014-06-14 06:04:43 -05:00
Robby Findler
fd3aaf6f20 fix struct/dc's flatness test so that contracts with lazy fields aren't flat
closes PR 14558
2014-06-14 04:03:15 -05:00
Vincent St-Amour
8b6d3e9117 Fix occurrence typing when comparing Byte and Positive-Rationa.
Closes PR14568.
2014-06-13 21:59:56 -07:00
Stephen Chang
243e607477 add note in syntax-parse docs about #:with and #:declare interaction 2014-06-13 14:43:29 -04:00
Matthew Flatt
49691c4000 fix glib build for Windows 64
The previous build attempted to cooperate with Valgrind in a way that
truncates a 64-bit address to a 32-bit address. Disable Valgrind
cooperation. (Other builds seem ok for now, but future rebuilds will
disable Valgrind cooperation for them, too.)
2014-06-13 16:32:51 +01:00
Matthew Flatt
dda2520a12 fix --enable-sgcdebug build 2014-06-13 16:32:51 +01:00
Matthew Flatt
aa487175ad change default MSVC projects to Visual Studio 2010 (version 10) and up
Visual Studio 2008 is still supported by "9.sln" projects and
".vcproj" files, while ".sln" and ".vcxproj" work for 2010, 2012,
and 2013. The "build.bat" script detects which version of
Visual Studio is active and uses the appropriate ".sln" files.

The bad news is that we have two copies of each project until we
decide to drop support for Visual Studio 2008. (We had two copies
before, but one copy was unmaintained.) The good news is that
we have only 2 copies of each project, because recent versions of
Visual Studio are willing to use 2010 projects as-is.

Change project and related files to text instead of always CRLF,
because that seems to be ok for modern Windows tools.
2014-06-13 16:32:51 +01:00
Matthew Flatt
b7610c405d distro-build: move a file out that is accessed directly
The "pack-all.rkt" file is needed before (and only before) the
distro-build package itself is ready, so move it to the "racket/src"
directory.
2014-06-13 16:32:51 +01:00
Robby Findler
c06542b393 bring back accidentally clobbered value-contract tests 2014-06-13 08:33:16 -05:00
Robby Findler
0a0c62a1e6 add has-blame? and value-blame 2014-06-13 08:28:40 -05:00
Robby Findler
56801372f0 add a test for behavior that's not currently liked 2014-06-13 05:43:08 -05:00
Robby Findler
3c6f0d5d04 add a test case to be sure recursive-contract accepts
values with sharing but without cycles
2014-06-13 03:02:20 -05:00
Robby Findler
17451d9662 Revert "change recursive-contract to reject cyclic values"
This reverts commit d664ee1430.

This commit broke recursive-contract because it disallowed any sharing,
not just cycles. And fixing this in the obvious way leads to about a 20x
slowdown (compared to v6.0's recursive-contract) on the micro-benchmark
mentioned in the original change to recursive contract.

So, for now, just go back to accepting cycles.
2014-06-13 03:02:19 -05:00
Robby Findler
d664ee1430 change recursive-contract to reject cyclic values
For a few reasons:

 - this seems to fit better with how TR already works

 - cyclic values are something that, at least in my experience,
   abstractions are not generally equipped to handle (and,
   perhaps worse, don't seem all that useful when weighed against
   the non-termination problems that can come up)

 - there was a suspicious case in the projection where, when a
   cycle was detected the projection just returned its argument
   (the place in the diff for this commit where there is now a
   call to raise-blame-error). I couldn't get this to cause problems,
   but this might just be because I'm not smart enough

related to PR 14559
2014-06-12 23:54:52 -05:00
Robby Findler
bebf41a36e change the render-metafunction #:contract? argument default to #f 2014-06-12 23:54:52 -05:00
Ryan Culpepper
f03a62a6c2 db/postgresql: disconnect on EOF at ready-for-query 2014-06-12 18:27:44 -04:00
Ryan Culpepper
f526d1b1c9 db: connection-pool checks connection is connected before handing out 2014-06-12 17:46:07 -04:00
Ryan Culpepper
d0eff55de5 better error message for unused #:declare clause 2014-06-12 17:03:41 -04:00
Ryan Culpepper
848067c5db fix typo 2014-06-12 14:34:25 -04:00
Ryan Culpepper
d330c2104e use correct editor class in syntax-browser snips 2014-06-12 14:14:34 -04:00
Robby Findler
7728e062f4 adjust recursive-contract so that it terminates on cyclic values
closes PR 14559

This slows down tight recursive contract loops by about 10%, using
the code below as the micro-benchmark:

(require racket/contract/base)

(define c
  (recursive-contract
   (or/c #f (cons/c c c))
   #:flat))

(define n1
  (let loop ([i 500000])
    (cond
      [(zero? i) #f]
      [else (cons (loop (- i 1)) #f)])))

(define n2
  (let loop ([i 500000])
    (cond
      [(zero? i) n1]
      [else (cons (loop (- i 1)) #f)])))

(collect-garbage) (collect-garbage) (collect-garbage)

(void
 (time (contract c n1 'pos 'neg))
 (time (contract c n2 'pos 'neg)))

(cdr n1)
(cdr n2)
2014-06-12 07:55:39 -05:00
Robby Findler
cdeb4b6343 add an example to the scale docs
related to PR 14562
2014-06-12 05:33:49 -05:00
Robby Findler
d067311cf7 Metafunctions now typeset their contracts as the first line
This is a backwards incompatible change, but there is a keyword
argument to render-metafunction and render-metafunctions that
goes back to the old behavior
2014-06-12 05:33:49 -05:00
Robby Findler
445a5dca15 add tabbing rule for with-syntax* 2014-06-12 04:05:48 -05:00
Matthew Flatt
8c1d4af684 pict: improve error for failure in pict->bitmap
Closes PR 14563
2014-06-12 07:42:47 +01:00
Matthew Flatt
71bbe6ca9c rackt/draw: fix internal error on too-large bitmap 2014-06-12 07:42:47 +01:00
Matthew Flatt
cef5b2cf07 pict: improve docs for scale
Closes PR 14562
2014-06-12 07:42:47 +01:00
Eric Dobson
dad3c3008d Fix type of stx->list. 2014-06-11 20:03:20 -07:00
Asumu Takikawa
07c944f337 Fix check-unreachable-code? mode in TR 2014-06-11 16:33:19 -04:00
Burke Fetscher
6695ccc8cd redex: fix benchmark package dependencies 2014-06-11 12:45:59 -05:00
Burke Fetscher
e4eb42616f redex: move benchmark into a separate package
Also:
* migrate all models from the diff-based method to
  an in-langauge approach using macros
* add a better interface for the harness
* add docs for
2014-06-11 11:49:29 -05:00
Sam Tobin-Hochstadt
1380cfea34 Fix test case for last commit.
There ought to be a way to improve the type of `apply-pattern-substitute`,
but we haven't found it yet.
2014-06-11 12:31:58 -04:00
Sam Tobin-Hochstadt
3273944af5 Fix bug in type of apply-pattern-substitute.
Found by @takikawa.
2014-06-11 12:20:48 -04:00
Sam Tobin-Hochstadt
07e0c3a789 Fix link to Kevin Tew's RacketCon 2012 talk.
Thanks to Evan Donahue for pointing this out.
2014-06-11 10:06:57 -04:00
Matthew Flatt
42e0d69746 racket/runtime-path: fix problems with 'so paths
Search for versions within a library directory, instead of searching
across library directories for a version. That way, user-specific libraries
can take precedence generally.

Fix the construction of library names with versions to match `ffi-lib`.
Specifically, put the version after the suffix on platforms other than
Mac OS X.

Put the code to resolve 'so specs in one place.
2014-06-11 09:23:04 +01:00
Matthew Flatt
5b852cc4bd setup/dirs: adjust get-lib-search-dirs and use if find-dll-dir
Add `find-dll-dir` to the end, not the beginning, so that it doesn't
override the user's directory. Improve checking for whether the DLL
directory is already covered by the library directories.
2014-06-11 09:23:04 +01:00
Vincent St-Amour
a62516977b Make description of future-event agree with the implementation.
... and with the description in the futures visualizer docs.
2014-06-10 17:04:06 -07:00
Matthew Flatt
ce08805026 raco setup: fix dependency checking for "racket" as a dependency 2014-06-10 19:15:12 +01:00
Matthew Flatt
e3118e1dae distro-build: create ".zip" files with timestamps as UTC 2014-06-10 19:15:12 +01:00
Matthew Flatt
2ea5fa3631 pkg/lib: create and unpack ".zip" files with timestamps as UTC 2014-06-10 19:15:12 +01:00
Matthew Flatt
e5dd7183b5 file/[un]zip: add UTC and time-rounding option
A `zip` archive normally holds timestamps in local time; a new option
records/interprets a UTC time instead. (Use the option both to zip and
unzip.) Also, add an option to round the 2-second resolution of time
to the past instead of the future (to avoid files with timestamps in
the future) when zipping.
2014-06-10 19:15:12 +01:00
Matthew Flatt
3342c19210 raco pkg catalog-archive: build on raco pkg catalog-copy
... instead of `pkg-catalog-update-local`.
2014-06-10 19:15:12 +01:00
Matthew Flatt
cbc734e75b distro-build: split vbox control to separate module 2014-06-10 19:15:12 +01:00
Matthias Felleisen
3ded9ea003 fixed the ~e sensitive test 2014-06-10 12:49:54 -04:00
Asumu Takikawa
b3a477d618 Handle union of different values for functions too
Closes PR 14557
2014-06-10 11:39:30 -04:00
Asumu Takikawa
7743386eec Allow send to union of objects
Also fix TR `send` for multiple/any values as receiver

Now emits a real type error instead of crashing with
an internal match error.

Closes PR 14547
2014-06-10 11:39:08 -04:00
Asumu Takikawa
ba7703b015 Refactor tc-send, delete trailing whitespace 2014-06-10 11:39:08 -04:00
Asumu Takikawa
ded8858f55 Fix error case for merge-tc-results 2014-06-10 11:39:07 -04:00
Matthias Felleisen
a8d799325f fixed error reporting code to see string 2014-06-10 10:27:39 -04:00