Commit Graph

4345 Commits

Author SHA1 Message Date
Spencer Florence
2139c776d8 adding new pict function 2016-01-01 16:22:31 -06:00
Vincent St-Amour
2dafb04587 Fix type of dup-output-port. 2016-01-01 16:05:41 -06:00
Vincent St-Amour
91b78dd9d9 Fix doc example. 2016-01-01 14:46:15 -06:00
Vincent St-Amour
607649c742 Improve link to OC docs. 2016-01-01 11:45:00 -06:00
Vincent St-Amour
40e7c969ab Refine type of min.
Closes PR14896.
2015-12-31 14:32:41 -06:00
Sam Tobin-Hochstadt
32fb50b4ce Merge pull request #283 from bennn/patch-1
typo: remove outdated comment
2015-12-31 14:36:48 -05:00
Benjamin Greenman
8f0f57a187 typo: remove outdated comment 2015-12-31 14:21:21 -05:00
Sam Tobin-Hochstadt
730a72709e Increase memory limit to avoid spurious failures. 2015-12-31 11:34:23 -05:00
Sam Tobin-Hochstadt
3be139b9b5 Merge branch 'opaque' 2015-12-31 10:53:30 -05:00
Robby Findler
d58d7487e8 port typed-racket contracts to late-neg projections 2015-12-31 08:58:32 -06:00
Alexis King
a3ca5aeefc Allow the types created for structs to be specified manually
This allows the types generated by the struct form, as well as #:struct
clauses of require/typed, to be specified explicitly using a #:type-name
option. This allows the name of a struct and the type it is assigned to
be different.

Closes #261
2015-12-30 13:12:05 -08:00
Sam Tobin-Hochstadt
d3fac7c24a Revise handling of #:opaque types, and Any.
Guard opaque predicates with an (-> Any Any) contract. This uses the
contract generation infrastructure to avoid wrapping struct predicates.

Also, relax `any-wrap/c` (the contract used for `Any` in positive
position) to allow opaque structures. This also requires an enumeration
of all the other kinds of values that TR understands, so that they are
not confused with opaque structures.

Joint work with @bennn.

Closes #202.
Closes #203.
Closes #241.
2015-12-30 12:33:15 -05:00
Sam Tobin-Hochstadt
6c4e584946 Revise Travis tests for 43a8cce3f. 2015-12-29 17:58:00 -05:00
Sam Tobin-Hochstadt
43694bf595 Merge pull request #250 from jsmaniac/improve-error-messages
Improving error messages, by providing more context.
2015-12-29 17:36:58 -05:00
Georges Dupéron
ce4a2b3d36 Improved error messages given by typed/racket, by always including the type name and arguments in the error message.
When a typing error is located inside macro-expanded code, a message such as “wrong number of arguments to polymorphic type: expected 1 and got 2” does not help much in locating which instantiation is wrong.
2015-12-29 17:35:32 -05:00
Sam Tobin-Hochstadt
3a7e616f97 Merge pull request #278 from AlexKnauth/flatten
add type for flatten
2015-12-29 17:24:43 -05:00
Sam Tobin-Hochstadt
43a8cce3fc Reorganize the TR testing files, and add progress output.
`typed-racket-test/main` is now the file to run for almost everything.
`typed-racket-test/run` continues to exist so that DrDr preserves the
timing history.

Integration tests now print a progress meter, which should fix the
Travis timeouts.
2015-12-29 16:43:25 -05:00
AlexKnauth
96fd22a7a3 add type for flatten
fixes https://github.com/racket/typed-racket/issues/277

Can’t make it polymorphic, settle for `Any -> (Listof Any)`
2015-12-24 10:09:23 -05:00
Sam Tobin-Hochstadt
10dc533751 Succcessfully typecheck new rackunit test-begin expansion. 2015-12-21 19:46:21 -05:00
Sam Tobin-Hochstadt
b00f74dad2 Avoid local-expand in typed/rackunit.
Fixes build problem.
2015-12-21 15:36:56 -05:00
Asumu Takikawa
b4489012a7 Temporarily disable examples until #264 is fixed 2015-12-20 17:04:55 -05:00
Asumu Takikawa
8791bdcdfc Remove evaluation imports that aren't needed 2015-12-20 17:04:55 -05:00
Asumu Takikawa
f08f3d07d4 Convert TR docs to use scribble/example 2015-12-20 17:04:55 -05:00
Asumu Takikawa
b18d940f1a Fix GH issue #271
Propagate syntax properties when opening up begins at the top-level
so that ignore properties will get transferred.
2015-12-18 18:10:48 -05:00
Vincent St-Amour
beb517c9c8 Ugh, typo. 2015-12-18 17:09:58 -06:00
Vincent St-Amour
439e0ba650 Required in wrong module. 2015-12-18 16:49:59 -06:00
Vincent St-Amour
f9e3418d8a Only show OC button in DrR when the tool is actually loaded.
Closes PR13344.
2015-12-18 15:58:40 -06:00
Sam Tobin-Hochstadt
519dfb6fdc Handle Sequenceof in the type parser to support multiple values. 2015-12-17 19:42:29 -05:00
Sam Tobin-Hochstadt
ad88f45bbe Merge pull request #269 from jsmaniac/fix-promise-provide
Fixes GH issue #268 “Can't provide promise for polymorphic struct”.
2015-12-17 09:50:21 -05:00
Georges Dupéron
f992786243 Fixes GH issue #268 “Can't provide promise for polymorphic struct”.
See also commit 5cd5f77 “Don't allow promises created with `delay/name` as `(Promise T)`.”.

The contracts in `typed-racket-lib/typed-racket/static-contracts/combinators/structural.rkt` should be just a single identifier, not a lambda expression, because `typed-racket-lib/typed-racket/private/type-contract.rkt` relies on that, and passes the contract name to free-identifier=?, which won't work on a lambda.
2015-12-17 14:52:40 +01:00
Georges Dupéron
c9e0197d51 Merge branch 'master' of github.com:racket/typed-racket into improve-error-messages 2015-12-17 13:51:25 +01:00
Sam Tobin-Hochstadt
077ff4ab2f Remove use of this-expression-source-directory.
Fixes presence of build system path in .zo files.
2015-12-11 10:12:33 -05:00
Alex Knauth
fdbf052bdb Merge pull request #259 from AlexKnauth/define-new-subtype-docs
Clarify define-new-subtype docs
2015-12-10 16:00:04 -05:00
Matthew Flatt
38e091c1c4 add type for an internal function in a match expansion 2015-12-09 17:21:56 -07:00
Asumu Takikawa
7f05dc6731 Update docs & tests for struct constructor options 2015-12-08 00:33:45 -05:00
Asumu Takikawa
796af399bf Support #:constructor-name in TR's struct 2015-12-08 00:33:43 -05:00
Asumu Takikawa
fc809e370e Add support for #:extra-constructor-name to struct
Simplify TR's define-struct to expand to struct
2015-12-08 00:33:06 -05:00
Alex Knauth
d3b56d8a5c Clarify define-new-subtype docs 2015-12-03 17:15:38 -05:00
Vincent St-Amour
70afdf6f70 Relax type of expt.
Made possible by the fix to its dynamic behavior.

Should be fully backwards compatible.
2015-12-02 15:44:23 -06:00
Sam Tobin-Hochstadt
600935aae1 Don't report duplicate error messages. 2015-12-02 11:00:47 -05:00
Sam Tobin-Hochstadt
9c1569646e Construct syntax to be checked with source locations.
Closes #258.
2015-12-01 14:22:16 -05:00
Sam Tobin-Hochstadt
ab4514bb56 Use symbols instead of identifiers for poorly-printing struct types.
This case only comes up when something else unfortunate has happened
with type printing, but the current implementation can lead to paths
in the type printing.
2015-11-30 17:55:26 -05:00
Vincent St-Amour
1d69569382 Fix tests. 2015-11-30 07:56:08 -06:00
Vincent St-Amour
781e0504bb Type of expt was overly optimistic. 2015-11-29 15:47:33 -06:00
Andrew Kent
581469e749 removed scope structs from types 2015-11-28 15:04:03 -05:00
Matthew Flatt
c4f39433e1 refine the type of collect-garbage
The `collect-garbage` function now accepts a mode argument.
2015-11-27 06:57:37 -07:00
Vincent St-Amour
6a8c366210 Fix type of expt to reflect fix to dynamic behavior. 2015-11-25 17:33:00 -06:00
Vincent St-Amour
fe4808f96a Fix magnitude on numbers with negative components.
Closes PR 15183.
2015-11-23 14:30:20 -06:00
Georges Dupéron
0201de0466 Improved error messages given by typed/racket, by always including the type name and arguments in the error message.
When a typing error is located inside macro-expanded code, a message such as “wrong number of arguments to polymorphic type: expected 1 and got 2” does not help much in locating which instantiation is wrong.
2015-11-20 14:08:33 +01:00
Sam Tobin-Hochstadt
f9825cb250 Add test for top-level mutated var fix. 2015-11-18 14:31:48 -05:00