Commit Graph

259 Commits

Author SHA1 Message Date
Asumu Takikawa
1a11ac53e2 Add typed/racket/random, bump version 2016-04-07 15:03:57 -04:00
Georges Dupéron
e33c902842 Remove debugging output from test case in typed-racket-test/succeed/define-typed-untyped-identifier-syntax-properties.rkt 2016-04-07 16:47:17 +02:00
Asumu Takikawa
2fc669e136 Adjust error message for test
Needed to change due to recent syntax-parse changes
2016-04-07 00:58:09 -04:00
Vincent St-Amour
6dc5b1a994 Fix optimizer test for changes to syntax-parse. 2016-04-06 12:06:42 -05:00
Georges Dupéron
4ab256abf2 Fixes GH issue #315 Syntax properties are not forwarded by define-typed/untyped-identifier, following @samth's suggestions. 2016-04-06 12:06:42 -05:00
Asumu Takikawa
9ec358b665 Update type-table after tc-funapp processing
This makes the tooltip show the more refined function
type after application typechecking. For example, case->
types will be narrowed to the particular case that fits.

Polymorphic function types will be instantiated at the
appropriate type.

Fixes issue #325
2016-03-28 17:53:34 -04:00
Sam Tobin-Hochstadt
7572adb9c2 Fix use of simple-result-> to check the domains.
This broke pict3d, but also disabled some contract checks that
should have been kept.
2016-03-28 17:11:37 -04:00
Asumu Takikawa
812f1a8c79 Add types for box-cas!, unsafe-box*-cas! 2016-03-23 16:02:22 -04:00
Daniel Feltey
425ff47700 Raise errors when signatures are not in the signature environment while typechecking
Closes #319
2016-03-12 16:39:39 -06:00
Asumu Takikawa
d23e05f2c3 Escape "~" in tc-error/fields arguments
Fixes issue #314
2016-03-02 04:43:34 -05:00
Georges Dupéron
350a8bb74e Changed how arguments and other pieces of information are printed, to follow the error message conventions, as suggested by samth in PR #250 .
* PR #250: https://github.com/racket/typed-racket/pull/250
* Error message conventions: http://docs.racket-lang.org/reference/exns.html?q=raise-arg#%28part._err-msg-conventions%29
2016-03-01 15:19:09 -06:00
Asumu Takikawa
72927e2248 Add the rest of Racket's exn hierarchy 2016-02-21 12:20:40 -05:00
Asumu Takikawa
a90f6c46eb Add exn:break:hang-up and exn:break:terminate 2016-02-21 02:48:45 -05:00
Stephen Chang
c19fac7fd5 add ids from in-hash- expansion to special-env
- fixes test failures due to 048c4b4a73
- add in-hash- tests
2016-02-05 18:26:03 -05:00
Sam Tobin-Hochstadt
0bfaa75bcf Add test for test-case from typed/rackunit. 2016-02-02 08:21:02 -05:00
Asumu Takikawa
0308a229ed Ensure define-typed-struct/exec has a Procedure
Fixes issue #293
2016-01-22 13:43:03 -05:00
Vincent St-Amour
f53314a21c Fix optimizer tests for nw, optimized hash iteration (in Racket). 2016-01-19 15:40:31 -06:00
Asumu Takikawa
bad5a35291 Fix type of file-position
Closes issue #297
2016-01-17 16:38:21 -05:00
Sam Tobin-Hochstadt
838431c176 Add the simple-result-> combinator to Typed Racket.
This is used for functions with a single argument imported with
`require/typed`, and avoids unneccessary checks. This produces a
3x speedup on the following benchmark:

  #lang racket/base
  (module m racket/base
    (provide f)
    (define (f x) x))
  (module n typed/racket/base
    (require/typed
     (submod ".." m)
     [f (-> Integer Integer)])
    (time
     (for ([x (in-range 1000000)])
       (f 1) (f 2) (f 3) (f 4))))
  (require 'n)

on top of the previous improvment from using `unsafe-procedure-chaperone`
and `procedure-result-arity`.
2016-01-16 22:27:18 -05:00
Asumu Takikawa
7217e2e531 Fix name argument for dtsi/exec
Looks like this got typoed in commit a3ca5aeefc

Closes issue #291
2016-01-15 11:58:38 -05:00
Vincent St-Amour
f6bb11c1d5 Fix test for removed missed opt logging. 2016-01-06 12:42:20 -06:00
Vincent St-Amour
40e7c969ab Refine type of min.
Closes PR14896.
2015-12-31 14:32:41 -06: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
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
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
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
Sam Tobin-Hochstadt
519dfb6fdc Handle Sequenceof in the type parser to support multiple values. 2015-12-17 19:42:29 -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
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
Asumu Takikawa
7f05dc6731 Update docs & tests for struct constructor options 2015-12-08 00:33:45 -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
Vincent St-Amour
1d69569382 Fix tests. 2015-11-30 07:56:08 -06: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
Sam Tobin-Hochstadt
f9825cb250 Add test for top-level mutated var fix. 2015-11-18 14:31:48 -05:00
Sam Tobin-Hochstadt
577ab41da6 Keep ignored provide forms in the output.
Closes #231.
2015-11-16 09:45:08 -05:00
Vincent St-Amour
1e32397658 Refine type for expt.
Fixes rsound.
2015-11-13 10:14:39 -06:00
Sam Tobin-Hochstadt
5f39bb3647 Increase with-tr-contracts timeout. 2015-11-12 18:41:52 -05:00
Vincent St-Amour
1187281bf7 Fix sign propagation in some real-complex corner cases.
May have been found using random testing a while back.
2015-11-12 16:08:20 -06:00
Vincent St-Amour
b88b4a8829 Fix magnitude opt to not overflow.
May have been found with random testing, a while ago.
2015-11-12 15:36:44 -06:00
Vincent St-Amour
53e501bb8b Avoid generating contraints for optimized-away contract definitions.
Closes #214.
2015-11-12 13:46:37 -06:00
Vincent St-Amour
3c1c5b1d03 Be more robust against one of {TR,R} erroring. 2015-11-10 16:39:18 -06:00
Eric Dobson
c9db5dded7 Make infer/dotted instantiate the dotted variable to improve inference.
With this we don't need to infer the length of the dotted variable,
in parts of the inference.

Closes #120.
2015-11-10 16:56:14 -05:00
Vincent St-Amour
caf62c5fc6 Travis CI has yet another FPU. 2015-11-10 10:33:50 -06:00
Vincent St-Amour
65f375f065 Refactoring. 2015-11-10 10:33:49 -06:00
Vincent St-Amour
7e7bef773f Have resource limits for individual test cases.
So that a term that takes too long doesn't doom the whole run.
2015-11-10 10:33:49 -06:00
Sam Tobin-Hochstadt
d9e3c2ac6a Repair da574a4 again. 2015-11-10 08:59:18 -05:00