Commit Graph

2283 Commits

Author SHA1 Message Date
Asumu Takikawa
e1799227f0 Fix tests where type variable scoping is wrong
original commit: 28108884ab90dfe29f721dcee8575afd7d1a7f5b
2012-12-13 17:54:58 -05:00
Asumu Takikawa
e8fc1ce747 Refactor to use syntax/id-table
original commit: 5c80743ed530031150e915dcf178bc4c9b89ec2b
2012-12-13 17:54:58 -05:00
Asumu Takikawa
6639ac8f4c Add type for xor
original commit: 2bc15286300c93542632f296140ed606819fbd88
2012-12-10 15:49:51 -05:00
Asumu Takikawa
300d3dae51 Fix TR error for missing mandatory keywords
original commit: c7162ec533ece42d3ece961f30a1c4ba2f8f4b3b
2012-12-06 12:20:54 -05:00
Vincent St-Amour
f7d1cab2bb Fix tests.
original commit: 9a5db10124a68e51bdaff2da4915ca16d5157a65
2012-12-04 19:29:16 -05:00
Vincent St-Amour
efb8befe33 Disable optimization of mixed-mode arithmetic that may involve exact 0.
Exact 0 turns out to also be a corner case for addition.

At this point, mixed-mode optimizations pretty much only apply for mixes
of floats and literal non-zero non-floats.

original commit: ac58c45477b060fbdc066f378eb200bb44defb59
2012-12-04 19:29:16 -05:00
Vincent St-Amour
2553e36d24 Don't warn about exact arithmetic for inexact numbers.
original commit: 45a3b9f48de31075fe8f83e60a7f47fe5db78aaa
2012-12-04 19:29:16 -05:00
Vincent St-Amour
21e2041a79 Don't optimize mixed-mode arithmetic if it would change results.
original commit: 93939f45d01206121b5c129ac2c7ba5ed89f7564
2012-12-04 19:29:16 -05:00
Vincent St-Amour
17c30d1648 Fix partial bounds checking elimination.
Closes PR13341.

original commit: fb73bc8b0eb35bfd9e2c35f14fce9ffd97b2b354
2012-12-04 19:29:16 -05:00
Vincent St-Amour
7e20c6dae8 Be less aggressive about fixnum recommendations.
Reduces false positives.

original commit: ca47b1c693b9fd48255b5e4872e20a8e7aca955b
2012-12-04 19:29:15 -05:00
Vincent St-Amour
849c6aca05 Fix source location information for do:' and let:'.
original commit: d544e9fbe72b205ca5b5c6efa4772067833d5b30
2012-12-04 19:29:15 -05:00
Asumu Takikawa
7917ff2033 Support path/object reasoning for promises
original commit: 5802b42f66706b6d7396aa1855f3d1d0b5f2ca17
2012-12-04 18:03:11 -05:00
Asumu Takikawa
3ff53eb009 Provide a more informative internal error
original commit: 04e8e33313842d94d0cbff458ad23047ee1441fc
2012-12-04 16:10:39 -05:00
Asumu Takikawa
a0c32ff288 Fix call/comp's type
original commit: 3f2d4663a87939a02223b6620407e25b0507aa4a
2012-12-04 16:10:39 -05:00
Vincent St-Amour
50713b7368 Randomly test the TR optimizer.
Compares results of a Racket and a TR sandbox.

original commit: ee0a1d4b89b2dbab9382d37fc4b0139a4ff9b53d
2012-12-03 21:54:01 -05:00
Vincent St-Amour
1501c1db01 Fix optimization of unary float subtraction.
Closes PR13339.

original commit: 9f9092b762cb4394e04901694301a1d0750f95d7
2012-12-03 19:46:29 -05:00
Ryan Culpepper
eb40161575 move lazy-require to racket/lazy-require
original commit: fd7d8a412cd9d6c4cb8b4c2e43dabd65890267b8
2012-12-03 19:28:12 -05:00
Asumu Takikawa
233e8964eb Support Any wrapping for promises
Closes PR 13326

original commit: 0252207e38aaa679ff78df8bba86f69c70d6912b
2012-12-03 17:59:55 -05:00
Asumu Takikawa
aab9400fbd Fix default prompt tag type
Note: this type could be made more precise,
but we need some contract changes for that.

original commit: 213ff3655409b7ad526154f3733de054f34d290c
2012-12-03 14:37:18 -05:00
Asumu Takikawa
24842684da Document the default prompt tag in TR
Note: this isn't the ideal location for this in the long
run because it isn't a special form. When we have more
bindings like this, we should move them to a new manual
section.

original commit: ffde8ec486abec4741e4d0299f841dcbfe65a3f2
2012-12-03 14:37:17 -05:00
Asumu Takikawa
d5a89d5cff Fix blame parties for proxied default prompt tag
original commit: 55944057b5bdf02b9fd48a964739dfcd4ee516d8
2012-12-03 14:37:17 -05:00
Asumu Takikawa
6ba4798b06 Revert "Ignore contracted proxies from racket"
This reverts commit 702676030b8d4c956d063b3ce4e3bf0d3dc2c594.

(this should actually be documented)

original commit: 25ed52f9d6f407b5ab32ecf5dca70d853d679744
2012-12-03 14:37:17 -05:00
Asumu Takikawa
de8434f9fa Ignore contracted proxies from racket
original commit: 702676030b8d4c956d063b3ce4e3bf0d3dc2c594
2012-11-30 23:45:23 -05:00
Asumu Takikawa
14187b4cdd Refactor (make argument arity clear)
original commit: 42fc3aeda01b987e1a60e14fe760444fc31732a4
2012-11-30 17:37:33 -05:00
Asumu Takikawa
0f0966b8f9 Add a type for continuation?
original commit: d9f8c5e382d941150369ccb0a0d09b9e8ce27cb5
2012-11-30 17:37:33 -05:00
Asumu Takikawa
711e418eec Univ -> ManyUniv
original commit: 5fe8841c9951bce9453dae77ca3e4768d6a59c3e
2012-11-30 17:37:33 -05:00
Asumu Takikawa
fec01c3f97 Add more tests for continuation marks & Any wrapping
original commit: a42cc9a0012cb7490da13228d21b2182fb1af9d3
2012-11-30 17:37:33 -05:00
Asumu Takikawa
bca928688a Rename control types to be consistent with other types
original commit: 904db66f6557a868ea616421253b8f0cc5e6bd27
2012-11-30 17:37:33 -05:00
Asumu Takikawa
37cbd6d5a9 Docs for prompt tag & mark key types
original commit: aae8890cd3939bf6dd6d0bddc640a2e03dcd1c3f
2012-11-30 17:37:33 -05:00
Asumu Takikawa
c6d22871bc Improve type of call-with-continuation-prompt
Now works with the handler argument omitted, in which case
the default handler is used. Note that the default handler
cannot be used in conjunction with the default prompt tag
because it is unsound to do so.

original commit: 4e0b38ea79b8ffa84fd099d980a2713a3831d589
2012-11-30 17:37:33 -05:00
Asumu Takikawa
80f7b65db7 Apply Any wrappers for default-continuation-prompt-tag in TR
original commit: 42b07475e95542ec77b47e216e8711573e0820a1
2012-11-30 17:37:33 -05:00
Asumu Takikawa
0c112d8da2 Refactor and move a macro to a helper library
original commit: 2511cf02bc67130abe360d39b59e40da3e4a741b
2012-11-30 17:37:33 -05:00
Asumu Takikawa
16a162a150 Fix up old TR tests that should fail now
original commit: d6b0c71a91e186837bd4350080d8936acdc494f5
2012-11-30 17:37:33 -05:00
Asumu Takikawa
550d4fde27 Add new tests for typed control
original commit: 3ed1d56b0526fb96546a2324d216527590518452
2012-11-30 17:37:33 -05:00
Asumu Takikawa
a613159c6b Add the rest of the continuation functions
original commit: 0accfe24e2d3f351d026d6a3138951e4cad7fdb7
2012-11-30 17:37:32 -05:00
Asumu Takikawa
06f43b2f41 Add Top types for prompt tags and mark keys
original commit: 41b59cb46a4b6f6d30cd57f0586fe73f79ef7584
2012-11-30 17:37:32 -05:00
Asumu Takikawa
6f376407d9 Typecheck prompt tags
original commit: 4b5d6e71fdfe68dea748b296c4427209d54a920f
2012-11-30 17:37:32 -05:00
Asumu Takikawa
5069b7b9b9 Fix continuation-mark-set-first type
original commit: e123e85a9068941d52dff902c4e4f1c0692ebf2c
2012-11-30 17:37:32 -05:00
Asumu Takikawa
72b7c5962e Contract generation for continuation mark keys
original commit: 5fbeffaec6094e8599175fde71ddc4194c2f5f1d
2012-11-30 17:37:32 -05:00
Sam Tobin-Hochstadt
373a7e8b0e Starting on control typing.
original commit: 29d54fb0d0650c62abf05729674d138c53ffefd8
2012-11-30 17:37:32 -05:00
Asumu Takikawa
c87dbd87a7 Forgot to add the test for commit b4dd3b5e1dcb
Relevant to PR 13209

original commit: d7163142be1b1d1d1f92bb233a1734762205e0de
2012-11-30 00:12:35 -05:00
Neil Toronto
7969c012a3 Stubbed out missing math/array' and math/statistics' doc entries to
clean up build

Moved `float-complex?' and `number->float-complex' to `math/base',
documented them

Documented `flexpt1p'

Removed `samples->immutable-hash' (not covariant anyway; not going to
use hashes)

original commit: 6f1ffecc2374f2874c1942fe0558420b74cbe223
2012-11-27 18:05:38 -07:00
Asumu Takikawa
678972a806 Fail gracefully on TR struct arity errors
Closes PR 13209

original commit: b4dd3b5e1dcbec41512c02f947253233f8c53370
2012-11-20 17:47:13 -05:00
Vincent St-Amour
c9972ae31c Add new versions of for/hash: and co that the typechecker can handle.
Based on Eric Dobson's implementation.

Closes PR13248. Closes PR13249.

original commit: 95d51fc8928145fb6f82c8c877e1efcb92432128
2012-11-20 17:45:15 -05:00
Vincent St-Amour
c797b00d02 Heterogenous -> heterogenEous.
Found by Ray Racine.

original commit: e2007abd7a06f5bd5ab7a5fd03180e9f2c20bc7f
2012-11-20 17:06:51 -05:00
Vincent St-Amour
c5600af371 Fix types of variable arity functions to work with 0-argument return values.
Closes PR13218.

original commit: d994ba19146f284809f410962e682c7293c41d63
2012-11-20 16:15:20 -05:00
Vincent St-Amour
dd27a40ad8 Only generate ->* contracts when arguments are really optional arguments.
Closes PR13274.

original commit: 6a7b971cd66b79e1aac0e0ea65bc59f667ef727e
2012-11-19 17:35:07 -05:00
Neil Toronto
690f54e633 Added `define-typed/untyped-identifier' to typed/untyped-utils
Made return types of `flvector-length' and `unsafe-flvector-length' more precise (they return Index)

original commit: ac424a73a5f3fa81d34f11585ff80b63b5cdebb6
2012-11-16 10:52:56 -07:00
Sam Tobin-Hochstadt
728e347f29 Use error-display-handler instead of threads for multiple error reporting.
Closes PR 13240 (in reality, avoids the bug, but ryanc says that it's too
hard to fix).

original commit: 30e26f00cdcf9a08f076b03bceb0a9b9255151fa
2012-11-15 12:33:25 -08:00
Asumu Takikawa
f6106431fb Fix whitespace in test
original commit: b4a98af3197ec0828dbe83ce835453598459bd22
2012-11-10 12:03:47 -05:00
Asumu Takikawa
fb52e98a05 Fix Custodian type
original commit: d22532db163bdb06007c248628c4002280817579
2012-11-10 11:12:06 -05:00
Asumu Takikawa
cf1a2c71d0 Fix a free variance bug
Commit ffe45ecce had introduced a regression with some
polymorphic functions imported between typed modules due to
miscommunicated variance information.

original commit: daca1c0d5b6040978b1c75d4cc822c0a3a819181
2012-11-09 01:43:57 -05:00
Sam Tobin-Hochstadt
3892d0101e Correctly bind place? for contract generation.
original commit: 0a0ac35ee6a427d3ca8341eb04a844a4ae7b8514
2012-11-07 12:21:09 -05:00
Sam Tobin-Hochstadt
dcb7dbac6d Chars are compared with eqv?.
original commit: 056c1aaff44918a4e2439aa84c6b931e1afd4473
2012-11-07 12:21:09 -05:00
Eli Barzilay
3e4bbc8394 Newlines at EOFs.
original commit: 14d8c8b5a5b665d03c14748e5416ec2f1753d4fb
2012-11-06 14:07:15 -05:00
Eli Barzilay
3fdc7889cb Some "obvious" switching from racket' to racket/base'.
original commit: 1c8001d174db69c57bfb0ee42e0ce75c2371e72e
2012-11-06 13:29:09 -05:00
Sam Tobin-Hochstadt
2dfa34a01c This test always errors -- belongs in fail.
original commit: c1cace28ec8072e77d70ccc40c27011c5f788295
2012-11-01 21:14:50 -04:00
Danny Yoo
dd38ff4d8c adding close-eval at the end of scribble files that have a toplevel evaluator
original commit: dcf4d8b040f1acdc535d1542e0d7b1bb1112d987
2012-11-01 15:32:53 -06:00
Tony Garnock-Jones
4229c80060 Correct TR types for udp-bind! and udp-connect!.
original commit: a57e158c43b25fac9803cb1af399e53b97144df0
2012-10-31 21:42:57 -04:00
Sam Tobin-Hochstadt
1240dcfc3e Fix binding of udp?.
original commit: f2fd47905f4fe981dea4bda03fd08bd930dc63a1
2012-10-31 21:39:16 -04:00
Sam Tobin-Hochstadt
ab1005ae6f Fix accidental use of the wrong letrec-bound variable.
original commit: 0e71f2d5dc58bd497a686f23c0ed0781590a3dc6
2012-10-31 21:18:44 -04:00
Sam Tobin-Hochstadt
fa259393da Make Typed Racket name printing more deterministic.
original commit: 5861bf0b9fc5ff3b237619d02dc6d5eb4a55837e
2012-10-28 13:55:02 -04:00
Sam Tobin-Hochstadt
4d00c00072 Add more specific class types instead of Any.
Fixes Insert Large Letters dialog.  Merge to 5.3.1.

original commit: 4124c9a41b26092aa0dd7a33916fd8e080aa626f
2012-10-27 17:44:52 -07:00
Sam Tobin-Hochstadt
b299fdb71c Formatting.
original commit: 7573fd7ee0f61b45dcff96d85e0cc6aab1982e6f
2012-10-27 17:44:51 -07:00
Sam Tobin-Hochstadt
45bc44e686 Flvectors and Fxvectors are higher-order if we give them restricted float types.
original commit: fa5846cb0c32b11e15cbfb0ca6e1fa2aadbd876e
2012-10-26 11:09:03 -07:00
Sam Tobin-Hochstadt
bde8ebbef0 Improve contract generation in Typed Racket.
This fixes several issues:
 - `Parameter` generates impersonator contracts correctly
 - `Any` handling now copies immutable data when possible
 - `Any` now recognizes more atomic base types

Merge to 5.3.1.

original commit: c6dc1e6ece441a7d56c2f2229dc9c0e144f8ff6f
2012-10-25 23:31:02 -07:00
Eli Barzilay
f19e523806 A whole bunch of missing newlines at EOFs (and a few other spaceages).
original commit: cbfb1fdb370244c2cadcf327332f1c643d4588c0
2012-10-19 06:47:24 -04:00
Vincent St-Amour
e2fae17d73 Don't provide for/vector: helpers.
original commit: fd6e2bd6c5f2867a2ba1f845b3e30ea5bf1e4a90
2012-10-15 12:03:53 -04:00
Vincent St-Amour
83b5e50288 Fix type of raise-range-error.
original commit: 5bc108c7b108d1a9856a193f11be259fb69ad035
2012-10-14 17:19:35 -04:00
Vincent St-Amour
a1e803ad7f Add test.
original commit: 326e3ba33f18a2c651b0dc8bfff388f8486fd114
2012-10-14 16:55:36 -04:00
Neil Toronto
2d549d13b1 Added typed/untyped-utils (just require/untyped-contract for now)
original commit: cdcf8f64327565e4665924b419468fbb9124129c
2012-10-14 16:53:33 -04:00
Vincent St-Amour
905416ec80 Document plet:.
original commit: aeddd7c18cebdcb12046a6491c7616cb0e4c75f4
2012-10-14 16:28:42 -04:00
Neil Toronto
66d5992c04 Added plet:
original commit: 9c11324cec1c6a5f3daeea6d51650747ea53a5b5
2012-10-14 16:28:42 -04:00
Neil Toronto
b3499cde19 Added working for/vector:, for*/vector:, for/flvector:, for*/flvector:
Closes PR13185.

original commit: 6f52be186b83fdb4340fa4eb772a3e6754050e71
2012-10-14 16:28:41 -04:00
Vincent St-Amour
9b65e0df92 More types for raise-* functions.
original commit: 3a8f4c24d909ea47ee1e71b79c824d8f7c12548c
2012-10-14 15:44:55 -04:00
Eric Dobson
e3905c3500 Add type for raise-argument-error in TR.
Closes PR13132.

original commit: d31005b380ceffce53315b91eeeff8655dd85e93
2012-10-14 15:44:55 -04:00
Eric Dobson
3239a56aee Make expt type more correct.
Closes PR13170.

original commit: 788b0465497087f0da49c9b27d8266fa3e2b83d1
2012-10-14 15:44:54 -04:00
Vincent St-Amour
3349c30fab Generate ->* contracts for functions with both optional and keyword arguments.
original commit: 844e898a548ea3b8fcecb97b0e59f8dcf06e0949
2012-10-14 15:44:54 -04:00
Vincent St-Amour
cc1dd45568 More float conversion optimizations.
original commit: 149d8535eb2988fab0bed739d375874f172db7c8
2012-10-14 15:35:50 -04:00
Asumu Takikawa
22cc8bc458 Move define/match to racket/match
original commit: df594d3b3bd6924b80942323803385964e9a708b
2012-10-14 14:39:36 -04:00
Vincent St-Amour
9170637137 Only recommend dropping exactness in truly inexact contexts.
Please merge to release.

original commit: 758e4ff112bf83544fdfc833f454930cc0bc5322
2012-10-12 14:42:16 -04:00
Vincent St-Amour
0cf2fc6810 Recommend float-specific operations in case of unexpected complex.
Please merge to release.

original commit: 7d317f1e96e77ca9ce85136608b49d420ad39630
2012-10-09 16:58:04 -04:00
Sam Tobin-Hochstadt
fa5f278293 Add Frame% and message-box types.
original commit: 385246f4db7f0bbf4ecfcdc5ee8a0f7ccbfdd4a1
2012-10-09 12:07:28 -04:00
Sam Tobin-Hochstadt
cd081cf9c4 Handle contract generation for recursive class types.
original commit: 6945c5bfb1a807e1e2d4b6cdf50db83b0623ad1d
2012-10-09 12:07:28 -04:00
Sam Tobin-Hochstadt
cf1ae8f3b1 Allow #:opaque and #:struct in require/typed.
original commit: 9054d0db7dee7d523b6a56a1cb68d703c3426f6f
2012-10-08 16:30:43 -04:00
Sam Tobin-Hochstadt
e119930d92 Add type for in-directory.
original commit: 724aee01888fce4fe00094d74604d36d48ade923
2012-10-07 17:45:09 -04:00
Sam Tobin-Hochstadt
ba5fa2d361 Allow invoking thunks on the untyped side of an Any.
original commit: 6fde63007eb0f560b1f86b4c2361d509e4240f41
2012-10-05 17:09:07 -04:00
Sam Tobin-Hochstadt
638b653967 Revamp handling of Any as a contract.
The contract now has two major differences:
 - It raises an error when it would have to wrap.
 - It uses chaperones to delay errors as long as possible

In general, using `Any` as a type when exporting to untyped
code will now just work, unless the untyped code tries to
communicate values back to the typed side, in which case an
immediate error will be raised.

Much of the implementation comes from the membrane design
from [Strickland et al, OOPSLA 2012].

original commit: 962f2472e18356f357f026645bdcebdf3139ba29
2012-10-05 12:39:11 -04:00
Sam Tobin-Hochstadt
cbca0b172f Simplify fast path for typechecking simple function applications.
Also, minorly revise subtyping code.

original commit: b3c640870e43ead323d1ef213e39e22a515a3a6b
2012-10-05 12:12:39 -04:00
Sam Tobin-Hochstadt
280df08a4d Fix contract-min/max base case.
original commit: 8bb697108e7ef3b77ecb5c6584b207fb86a6bbac
2012-10-04 16:13:21 -04:00
Sam Tobin-Hochstadt
fca69adaf7 This pattern of typed submodules exposes Racket bugs.
original commit: 86522a180429eb8fbf0a2066961692ee6090f808
2012-10-03 12:24:16 -04:00
Vincent St-Amour
fa90cdc1a6 Remove out of date comment.
original commit: 6ba0c1416e535ae13192a1ca8dff69f90a635a8f
2012-10-02 10:18:48 -04:00
Sam Tobin-Hochstadt
7ac3b4632e Don't provide internal identifier.
original commit: d84631bc6f813e38e0c9fe05f681cba5027e2584
2012-09-27 18:29:43 -04:00
Eric Dobson
bc2abb42c8 Replace uses of Type? in contracts with Type/c.
original commit: 8a8dc66a191342ec5de1a4dc6bec3f61d3f0f54f
2012-09-27 18:10:38 -04:00
Sam Tobin-Hochstadt
43863acd36 Test for appropriate predicates for invariant structs.
original commit: cab90c16d5514ac4c9dff70ebcaeb3dda75e0910
2012-09-27 17:26:32 -04:00
Sam Tobin-Hochstadt
bb2afd9169 Fix define-typed-struct/exec to pass struct-info.
original commit: ee4ba2e3dd18d875a7e7fb6a3a00d9fe9b222ea2
2012-09-27 17:08:49 -04:00
Sam Tobin-Hochstadt
0f2cffde42 Fix error message pattern for use of cons/c.
original commit: d066a5c1d27a8c292a7c0560da08f394f9a75b88
2012-09-27 16:39:16 -04:00
Sam Tobin-Hochstadt
b0c5952bd1 Ensure that identifiers defined by struct are registered as being defined in the correct module.
original commit: c07852eaf134a73cd8a147566583e75e5655c799
2012-09-27 16:22:22 -04:00
Eric Dobson
bfcd273225 Made free-variance have less special cases.
original commit: cf4d43c04f031dd1f0ac9811e19755707d1d9c42
2012-09-27 16:22:22 -04:00
Eric Dobson
6fcac4b7ae Working covariant applications.
original commit: ffe45ecce455927fe149eee64efe126b7666cd46
2012-09-27 16:22:22 -04:00