Typed Racket
Go to file
Marc Burns 609d6189e9 Improve typecheck for private field initializers
This patch addresses two issues with `typed/racket/class`:

1. For multiple private fields declared with `define-values`, type
information does not propagate from the values produced by the
initialization expression to the declared fields. This breaks soundness
of private fields: A field can be annotated with a type that does not
contain the field's initial value.

This was resolved by keeping a table of temporary bindings introduced in
the expansion of the initializer along with their types. The field
setter's type is then checked against that of the corresponding
temporary.

2. The class body typechecker assumes that the `expr` of
a `define-values` clause will expand to a bare `(values vs ...)`.

This was resolved by generalizing the template for matching an expanded
`define-values` initializer and extracting the type information from the
`expr` instead of each element in `(vs ...)`.
2015-05-12 18:42:05 -04:00
source-syntax Remove extra directories. 2014-12-02 00:53:36 -05:00
typed-racket Remove extra directories. 2014-12-02 00:53:36 -05:00
typed-racket-compatibility Remove extra directories. 2014-12-02 00:53:36 -05:00
typed-racket-doc Remove dependency on compatibility-lib in the docs 2015-04-03 18:42:12 -07:00
typed-racket-lib Improve typecheck for private field initializers 2015-05-12 18:42:05 -04:00
typed-racket-more Add keyword argument for get/set-argb-pixels 2015-04-14 17:53:32 -04:00
typed-racket-test Improve typecheck for private field initializers 2015-05-12 18:42:05 -04:00
.gitignore Add standard .gitignore file. 2014-12-06 17:46:25 -05:00
.travis.yml Try a smaller install. 2014-12-12 17:59:21 -05:00
README.md Fix Travis image URL in the README 2015-02-25 15:17:13 -05:00

Typed Racket

Build Status

Typed Racket is Racket's gradually-typed sister language which lets you add statically-checked type annotations to your programs. For more information, see the Typed Racket Guide.

Installation

Typed Racket is bundled in the default Racket distribution, which you can download from Racket's download page.

You can also manually install it from the main package catalog with the following command:

raco pkg install typed-racket

Documentation

The documentation is also bundled in your local copy of Typed Racket.


Copyright (c) 2010-2015 PLT Design Inc.

This package is distributed under the GNU Lesser General Public License (LGPL). This means that you can link this package into proprietary applications, provided you follow the rules stated in the LGPL. You can also modify this package; if you distribute a modified version, you must distribute it under the terms of the LGPL, which in particular means that you must release the source code for the modified software. See http://www.gnu.org/copyleft/lesser.html for more information.