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
Eric Dobson
5f0717d278
Make disabling the custom printer work.
2012-08-14 09:45:01 -04:00
Sam Tobin-Hochstadt
aa6ed4d736
Don't generate rest specification for ->* when not needed.
2012-08-10 11:00:02 -04:00
Eric Dobson
3876dfa841
Make generated flat contracts actually flat.
2012-08-10 10:39:44 -04:00
Eric Dobson
9ed360bb5e
Removed convenience.rkt from typed racket.
2012-08-07 15:50:50 -04:00
Eric Dobson
6dbc054e41
Replaced references to abbrev.rkt with convenience.rkt.
...
Skipped this for subtype.rkt, because of a require loop caused by
lazy-require.
2012-08-07 15:50:50 -04:00
Eric Dobson
e6d4fb2ee2
Fill hole in recursive type soundness. Fixes PR 11372.
2012-08-06 12:31:07 -04:00
Eric Dobson
9f453676d1
Add support for creating contracts of heterogenous vectors
2012-08-06 12:31:07 -04:00
Sam Tobin-Hochstadt
22904ef43e
Use lazy
instead of delay
, as recommended by Eli.
2012-07-17 07:11:23 -04:00
Sam Tobin-Hochstadt
1dca82784b
Handle arbitrary recursive contracts generated from Rec
types.
2012-07-14 22:45:08 -04:00
Sam Tobin-Hochstadt
f40c7f11a6
Mutable data at typed boundaries can't have flat contracts.
...
Closes PR 12884.
2012-07-14 20:43:35 -04:00
Sam Tobin-Hochstadt
546c12cf2a
Parse (Struct t)
as StructTop.
...
Close PR 12903.
2012-07-14 19:20:51 -04:00
Sam Tobin-Hochstadt
683f8e4e4b
Use promises for current-type-names
.
2012-07-13 17:10:50 -04:00
Sam Tobin-Hochstadt
6bf141513f
Revise type environment propagation to use submodules.
...
Each typed module now defines a submodule named `type-decl`.
This module performs the type environment initialization (along
with other environment updates) when invoked. Additionall,
every typed module, when invoked, performs a for-syntax addition
to a list specifying the submodules that need invocation.
This invocation is then performed by the `#%module-begin` from
Typed Racket.
The `type-decl` module always goes at the beginning of the
expanded module, so that it's available at syntax-time for all
the other submodules. This involved adding pre- and post-
syntaxes for the results of typechecking.
This allows significant runtime dependency reduction from the
main `typed/racket` and `typed/racket/base` languages (not yet
complete).
2012-07-10 12:49:27 -04:00
Sam Tobin-Hochstadt
20e95f8d8e
More refactoring and reduction of runtime dependencies.
2012-06-28 14:34:07 -04:00
Sam Tobin-Hochstadt
f075ecd36e
File splitting, dependency reduction.
2012-06-28 14:34:07 -04:00
Sam Tobin-Hochstadt
88ff5fee69
Minor refactorings.
...
- Remove tracing requires.
- Use lists instead of sets in a few environments.
- Small cleanups.
2012-06-25 18:07:45 -04:00