Eric Dobson
8b1c643bca
Consolidate the rest of the syntax properties in TR.
...
(cherry picked from commit 4310f04eaf
)
2013-07-08 10:34:13 -04:00
Eric Dobson
7383a685e3
Centralized typechecker:ignore properties.
...
(cherry picked from commit a325e38046
)
2013-07-08 10:34:13 -04:00
Eric Dobson
a945181907
Centralize the definition of the plambda syntax property.
...
(cherry picked from commit df07151cb9
)
2013-07-08 10:34:13 -04:00
Asumu Takikawa
a18bf85b4f
Only generate poly contracts for functions
...
Closes PR 13815
(cherry picked from commit bafaf52056
)
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
Asumu Takikawa
11f7d8b452
Fix broken internal error
...
(cherry picked from commit e6503c5df6
)
2013-07-08 10:34:11 -04:00
Eric Dobson
4f0af0de72
Make scoped type vars work only for explict Alls and annotations.
...
Solves major issue disscussed on PR 13586.
Closes PR 13622.
Solves issue when typechecking lambdas with types like (All (a) Any).
Closes PR 13596.
Closes PR 13539.
Closes PR 13703.
(cherry picked from commit 01a88f8db1
)
2013-07-08 10:34:11 -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
a668c5d78b
Add comments, purpose statements, and contracts
...
(cherry picked from commit bb2ecbf8cb
)
2013-07-08 10:34:10 -04:00
Asumu Takikawa
691c156777
Fix parsing of (Struct ...) types.
...
This was a regression that appeared in 5.3.1
(cherry picked from commit 3eb4a75613
)
2013-07-08 10:34:10 -04:00
Eric Dobson
a901650bab
Fix contract generation for mutable structures.
...
(cherry picked from commit de96643fbe
)
2013-07-08 10:34:08 -04:00
Eric Dobson
8d78a2a152
Make type->contract correctly respect variance.
...
Track whether we are protecting values from the typed side and/or the
untyped side.
Closes PR 13662.
Closes PR 13663.
Closes PR 13665.
(cherry picked from commit b5b13222c8
)
2013-07-08 10:34:07 -04:00
Eric Dobson
67590cade8
Allow requiring functions with filters in contravariant positions.
...
(cherry picked from commit dbcb1414da
)
2013-07-08 10:34:07 -04:00
Eric Dobson
9411b01e3f
Switch out? to from-typed? as it has the same meaning.
...
(cherry picked from commit 03e1ffda3e
)
2013-07-08 10:34:07 -04:00
Eric Dobson
eff170b33e
Correctly protect Procedures in TR.
...
Closes PR 13664.
(cherry picked from commit fc36c12ce4
)
2013-07-08 10:34:06 -04:00
Asumu Takikawa
9eaf5aaddb
Remove unnecessary type->contract case
2013-04-05 16:56:50 -04:00
Asumu Takikawa
0161dfdf16
Translate Value types to ctcs with better names
...
e.g., True -> '#t instead of
True -> "#t" for a flat-named-contract
2013-04-05 16:56:50 -04:00
Eric Dobson
94861becd0
Fix untested contract generation code.
...
Closes PR 13449.
2013-04-04 08:29:15 -07:00
Vincent St-Amour
0bccf6b0b0
Forbid singleton types for integers whose type is platform-dependent.
...
Closes PR13501.
2013-02-11 14:30:19 -05:00
Eric Dobson
e656bdb1c5
Make generated contracts for Floats include NaN.
...
Closes PR13464.
2013-02-04 14:32:44 -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
Asumu Takikawa
4b279eaf6a
Use new parameter/c argument for contract generation
...
Closes PR 13446
2013-01-23 14:45:59 -05:00
Eric Dobson
f315880b50
Replace uses of Type? with Type/c?.
2013-01-15 12:23:42 -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
27d3042ad6
Use correct contract for Procedure type
...
The only problem with this contract is that it does
not produce a very good error message
2013-01-08 20:03:16 -05:00
Asumu Takikawa
9c0a611b59
Disallow duplicate type variable declarations
...
Closes PR 13416
Please merge to 5.3.2
2013-01-08 14:50:08 -05:00
Vincent St-Amour
8c66be33e7
Fix contract generation for functions with optionals and keyword arguments.
...
Closes PR13354.
2012-12-17 13:57:32 -05:00
Asumu Takikawa
13b831f0ec
Fix unsound type variable scoping
...
Closes PR 13123
2012-12-13 17:54:58 -05:00
Asumu Takikawa
904db66f65
Rename control types to be consistent with other types
2012-11-30 17:37:33 -05:00
Asumu Takikawa
42b07475e9
Apply Any wrappers for default-continuation-prompt-tag in TR
2012-11-30 17:37:33 -05:00
Asumu Takikawa
4b5d6e71fd
Typecheck prompt tags
2012-11-30 17:37:32 -05:00
Asumu Takikawa
5fbeffaec6
Contract generation for continuation mark keys
2012-11-30 17:37:32 -05:00
Vincent St-Amour
e2007abd7a
Heterogenous -> heterogenEous.
...
Found by Ray Racine.
2012-11-20 17:06:51 -05:00
Vincent St-Amour
6a7b971cd6
Only generate ->* contracts when arguments are really optional arguments.
...
Closes PR13274.
2012-11-19 17:35:07 -05:00
Sam Tobin-Hochstadt
c6dc1e6ece
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.
2012-10-25 23:31:02 -07:00
Vincent St-Amour
844e898a54
Generate ->* contracts for functions with both optional and keyword arguments.
2012-10-14 15:44:54 -04:00
Sam Tobin-Hochstadt
6945c5bfb1
Handle contract generation for recursive class types.
2012-10-09 12:07:28 -04:00
Sam Tobin-Hochstadt
962f2472e1
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].
2012-10-05 12:39:11 -04:00
Sam Tobin-Hochstadt
8bb697108e
Fix contract-min/max base case.
2012-10-04 16:13:21 -04:00
Eric Dobson
8ea7502c12
More cleanup of struct type registration.
2012-09-27 16:22:21 -04:00
Eric Dobson
2a8512ed72
Removed unused fields in Struct
2012-09-27 16:22:21 -04:00
Eric Dobson
745403a88e
Make struct type contracts better
2012-09-27 16:22:21 -04:00
Eric Dobson
9e1cf579a4
Fix type->contract on structures. Now uses struct/c.
2012-09-27 16:22:21 -04:00
Sam Tobin-Hochstadt
eed93825ab
Track mutable variables across modules.
2012-08-31 17:45:11 -04:00
Eric Dobson
115345300d
Allow contract definitions created from expressions to be fixed up.
2012-08-20 12:39:40 -04:00
Eric Dobson
09d32d35e0
Add promise support to type->contract.
...
Closes PR13024.
2012-08-20 10:10:17 -04:00
Eric Dobson
ac493a6f44
Replaced infer-dummy with lazy-require.
2012-08-14 16:04:51 -04:00
Eric Dobson
fdd2966cf4
Removed deprecated printf/log.
2012-08-14 16:04:48 -04:00
Eric Dobson
2e3965e777
Make simple substitution happen all at once.
...
Closes pr12920.
2012-08-14 14:44:55 -04:00