Commit Graph

29 Commits

Author SHA1 Message Date
Sam Tobin-Hochstadt
6fde63007e Allow invoking thunks on the untyped side of an Any. 2012-10-05 17:09:07 -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
Eric Dobson
ffe45ecce4 Working covariant applications. 2012-09-27 16:22:22 -04:00
Eric Dobson
d84391b695 More struct work 2012-09-27 16:22:21 -04:00
Ryan Culpepper
29a9abf394 fix bad attr reference (datum attr doesn't exist)
That macro doesn't seem to be used anywhere. Perhaps it can just
be deleted.
2012-09-17 12:29:17 -04:00
Sam Tobin-Hochstadt
eed93825ab Track mutable variables across modules. 2012-08-31 17:45:11 -04:00
Eric Dobson
6e2e84664d Move list-set and list-update to unstable/list. 2012-08-20 14:45:50 -04:00
Eric Dobson
fdd2966cf4 Removed deprecated printf/log. 2012-08-14 16:04:48 -04:00
Sam Tobin-Hochstadt
973da6a50c Move define-struct/printer to new file.
Avoids runtime dependency on `racket/generic`.
2012-08-14 10:31:22 -04:00
Eric Dobson
cac47c0427 Make TR debug printer work again. 2012-08-14 09:45:01 -04:00
Eric Dobson
5f0717d278 Make disabling the custom printer work. 2012-08-14 09:45:01 -04:00
Eric Dobson
c9afe15f56 Cleanup TR printer to use lazy-require. 2012-08-14 09:45:01 -04:00
Vincent St-Amour
4b30d052b0 Allow multi-line printing of case-> types.
Currently only used in :print-type. Everywhere else, types are pruned.
2012-08-07 16:31:52 -04:00
Sam Tobin-Hochstadt
22904ef43e Use lazy instead of delay, as recommended by Eli. 2012-07-17 07:11:23 -04:00
Eric Dobson
030e56311e Make TR compile cleanly with contracts enabled.
Added a couple of contracts and fixed some others up as well.
The two bugs were that with-contract was not imported, and that
subtype could be called with Values and Results.
2012-07-15 19:21:11 -04:00
Sam Tobin-Hochstadt
683f8e4e4b Use promises for current-type-names. 2012-07-13 17:10:50 -04:00
Sam Tobin-Hochstadt
5ab3827b48 Delay actual initialization of type environment. 2012-07-12 17:41:12 -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
Sam Tobin-Hochstadt
a05acfee4c Split out some small utilities to prepare to reduce dependencies. 2012-06-25 14:10:18 -04:00
Sam Tobin-Hochstadt
ccb724155a scheme -> racket 2012-06-25 13:39:07 -04:00
Sam Tobin-Hochstadt
865a2cdcbd Support definitions of keyword functions in Typed Racket.
Caveats:
 - keyword function definitions do not define static
   bindings, thus limiting optimization opportunities
 - can't use `define:`, `lambda:`, etc with keywords
 - error messages sometimes expose the implementation
 - the optimizer skips most of the generated code for
   keyword functions definitions (user-level code is
   optimized)
2012-06-02 18:22:07 -04:00
Asumu Takikawa
4651ccc0ad Fix a TR issue with syntax-local-lift-expression 2012-05-03 19:36:32 -04:00
Sam Tobin-Hochstadt
1abb027fc7 Fix Typed Racket build with contracts enabled. 2012-04-06 10:24:49 -04:00
Ryan Culpepper
e086d237cd moved unstable/mutated-vars back to typed-racket 2011-12-18 13:57:49 -07:00
Sam Tobin-Hochstadt
da5b68fd4d Fix wrapping of null' when provided as Any'.
Reported by 'dingfeng' on #racket.
Please merge to 5.2.
2011-10-21 10:55:57 -04:00
Matthew Flatt
0197902309 add var-ref->mod-decl-insp' and switch cur-code-insp' uses
Macros and other tools that need syntax privilege used
`(current-code-inspector)' at the module top-level to try to
capture the right code inspector at load time. It's more
consistent to instead use the enclosing module's declaration-time
inspector, and `var-ref->mod-decl-insp' provides that. The
new function works only on references to anonymous variables,
which limits access to the inspector.

The real function name is longer, of course.
2011-09-20 13:50:36 -06:00
Sam Tobin-Hochstadt
ff1776e522 Revert "Re-enable timing"
This reverts commit a134ec73ed.
2011-09-03 20:51:35 -04:00
Sam Tobin-Hochstadt
a134ec73ed Re-enable timing 2011-09-03 20:49:40 -04:00
Sam Tobin-Hochstadt
d2e1cc02dc Move typed-scheme to typed-racket collection.
Compatibilty typed-scheme collection left.
2011-09-03 20:49:39 -04:00