Asumu Takikawa
90b149dc46
Fix union merging
...
Trying to merge (and thus resolve) applications of struct
types would cause infinite looping on type instantiation
if the struct type used both a union and recursion.
Closes PR 13821
(cherry picked from commit c8e281a80e
)
2013-07-08 10:34:12 -04:00
Eric Dobson
d04ee6125a
Make for loops in TR use an annotation when applicable.
...
(cherry picked from commit f6050d5587
)
2013-07-08 10:34:12 -04:00
Sam Tobin-Hochstadt
d5c62424f8
Fix types of system
etc for new keyword arguments.
...
This requires extending the ->optkey type constructor to support rest
arguments, and fixing the keyword function type generation code.
Testing is still limited because there's no parsing for such types.
That will be handled in a later commit.
(cherry picked from commit 3fd9df03f7
)
2013-07-08 10:34:12 -04:00
Eric Dobson
ef66cb0ca7
Massive cleanup of requriements in TR.
...
(cherry picked from commit f332affa5a
)
2013-07-08 10:34:11 -04:00
Asumu Takikawa
c2f5b31e96
Expend printing fuel in all branches
...
This makes (:type (Number -> Integer)) produce
(Number -> Integer) instead of expanding at the first name.
Combined with expansion cues, this makes it easier for users
to expand the relevant parts of types.
(cherry picked from commit 34aeaee672
)
2013-07-08 10:34:10 -04:00
Asumu Takikawa
664a370a1b
Cue user about unexpanded type aliases
...
This tells the user that more type aliases are
available for expansion. For example, (Listof Number)
has the alias Number still unexpanded into the union
that it represents.
(cherry picked from commit 19c5d3eaad
)
2013-07-08 10:34:10 -04:00
Asumu Takikawa
b35e0fd138
Cut off type printing with :type at one level
...
Makes types print nicer with :type in most cases.
Previously, the printer expanded type aliases as much
as possible. Now, it defaults to a single level of expansion.
A later commit adds a #:verbose option to show the entire
type.
(cherry picked from commit fd33584b6f
)
2013-07-08 10:34:10 -04:00
Asumu Takikawa
b9a33acc66
Refactor and add purpose statements/contracts
...
(cherry picked from commit 64e1b68c8d
)
2013-07-08 10:34:10 -04:00
Sam Tobin-Hochstadt
20f546110b
Refactor subtype.rkt not to use exceptions.
...
Matthew suggests that using exceptions for failure
in the implementation of `subtype` is a performance
problem. This commit removes all use of exceptions
for failure in subtype.rkt, replacing it with the
standard Racket #f/value option.
Extensive use is made of the `subtype-seq` form,
which is basically do-notation for the subtyping
monad.
(cherry picked from commit a6f110893f
)
2013-07-08 10:34:09 -04:00
Eric Dobson
8483d0cd6f
Minor cleanup in subtype.rkt
...
(cherry picked from commit b9c4582746
)
2013-07-08 10:34:09 -04:00
Eric Dobson
52f892a5fd
Fix subtyping of (ListDots t 'a) <: (Listof t).
...
Closes PR 13636.
(cherry picked from commit 6898a7c880
)
2013-07-08 10:34:07 -04:00
Eric Dobson
5f34da6692
Terminate typechecking on cyclic lists.
...
Closes PR 13687.
(cherry picked from commit b8ab1334d9
)
2013-07-08 10:34:06 -04:00
Eric Dobson
17b9ed0a75
Fix prefix-of.
...
Closes PR 13448.
2013-04-04 07:42:45 -07:00
Eric Dobson
0e0f1cd670
Adds subtyping for filters, and fixes -FS to be more precise.
...
Closes PR 12817.
2013-04-03 09:25:28 -07:00
Eric Dobson
8d080b74cb
Fix Struct-Type-Property.
...
Closes PR 13593.
2013-03-23 08:24:05 -07:00
Eli Barzilay
af6be85ff5
Fix lots of indentation mistakes.
...
(Found by my ayatollah script...)
2013-03-14 10:55:47 -04:00
Eric Dobson
71d6189132
Cleanup of subtyping, additional comments, and improved short circuting.
2013-03-13 22:59:27 -07:00
Eric Dobson
75f89107b1
Make PolyDots be subtypes even if they have different fixed arguments.
2013-03-13 22:29:41 -07:00
Eric Dobson
6335de099e
Make PolyDots actually subtype correctly.
2013-03-13 22:29:41 -07:00
Vincent St-Amour
2846c17cb4
Fix the fix to TR contracts.
2013-02-25 20:10:14 -05:00
Vincent St-Amour
034aacafab
Fix TR contracts.
2013-02-25 19:25:39 -05:00
Eric Dobson
f6df93ed96
Make mutable lists be sequences.
2013-02-22 21:01:21 -08:00
Vincent St-Amour
12aaa229a3
Fix subtyping for Negative-Single-Flonum.
2013-02-21 10:49:57 -05:00
Eric Dobson
18d90115e7
Make naturals be a sequence type.
2013-02-20 21:25:02 -08:00
Eric Dobson
4f9f00680e
Make (Set a) a subtype of (Sequenceof a).
...
Closes PR13485.
Closes PR12615.
2013-02-20 21:25:02 -08:00
Eric Dobson
a7bc758505
Fix subtyping of invariant data structures.
...
Closes PR13521.
2013-02-20 21:25:02 -08:00
Eric Dobson
ddb8e7f807
Add subtyping for Parameters.
...
Closes PR11992.
This required moving more stuff in to base-abbrev so that it could be
used in subtype.
2013-02-20 21:25:02 -08:00
Eric Dobson
5ed26e806b
Make lists with minimum lengths be a subtype of sequences.
2013-02-14 18:24:52 -05:00
Eric Dobson
3c31803c19
Add a simple-Union and Bottom, and have code use them.
...
Requires splitting out the match expanders from base-abbrev.
2013-02-14 18:24:52 -05:00
Eric Dobson
19241c0979
Make overlap more precise.
2013-02-08 11:19:10 -05:00
Vincent St-Amour
830db3c908
Add extra tests and warning about -PosIntNotFixnum.
2013-02-07 15:19:42 -05:00
Eric Dobson
9030da217b
Make static single flonum checks correct.
...
Closes PR13499.
2013-02-07 15:19:42 -05:00
Eric Dobson
9e8cc6af3c
Add types for imaginary numbers and fix type of exact? and inexact?.
2013-02-04 14:32:44 -05:00
Eric Dobson
13ff5883fe
Do not update subtype and resolve caches when subtyping.
...
Closes PR13412.
2013-01-28 15:35:56 -05:00
Sam Tobin-Hochstadt
492bda2305
Avoid using unsafe structure access.
...
Moral: a little temporary speed should never be bought at the cost of safety.
2013-01-24 23:15:06 -05:00
Eric Dobson
a2f33f17e9
Remove tc-results? and other minor improvements.
2013-01-23 18:15:21 -05:00
Eric Dobson
05e53a0de5
Add tc-any-results as new result-type.
2013-01-23 16:41:09 -05:00
Eric Dobson
aac25b42c9
Make AnyValues but don't actually start using it yet.
2013-01-23 16:41:09 -05:00
Eric Dobson
5fe004cd9b
Make TR compile with contracts enabled again.
2013-01-15 12:36:42 -05:00
Eric Dobson
f315880b50
Replace uses of Type? with Type/c?.
2013-01-15 12:23:42 -05:00
Sam Tobin-Hochstadt
696583582b
Add struct constructor table.
2013-01-11 18:40:20 -05:00
Asumu Takikawa
f577b49a4d
Fix polydots
...
- parsing of polydots values was fixed
- certain polydots error cases are now reported
- the custom application rule for values was fixed
Closes PR 13365
Please merge to 5.3.2
2013-01-09 18:12:45 -05:00
Asumu Takikawa
5802b42f66
Support path/object reasoning for promises
2012-12-04 18:03:11 -05:00
Asumu Takikawa
04e8e33313
Provide a more informative internal error
2012-12-04 16:10:39 -05:00
Ryan Culpepper
fd7d8a412c
move lazy-require to racket/lazy-require
2012-12-03 19:28:12 -05:00
Asumu Takikawa
904db66f65
Rename control types to be consistent with other types
2012-11-30 17:37:33 -05:00
Asumu Takikawa
41b59cb46a
Add Top types for prompt tags and mark keys
2012-11-30 17:37:32 -05:00
Asumu Takikawa
4b5d6e71fd
Typecheck prompt tags
2012-11-30 17:37:32 -05:00
Sam Tobin-Hochstadt
29d54fb0d0
Starting on control typing.
2012-11-30 17:37:32 -05:00
Asumu Takikawa
b4dd3b5e1d
Fail gracefully on TR struct arity errors
...
Closes PR 13209
2012-11-20 17:47:13 -05:00