[plt-scheme] A new version of Typed Scheme

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Wed Feb 24 13:55:03 EST 2010

I think it would be nice to go through common problems doing
conversion. A simple thing I can think of that hits me every time is
that I think a function will work like:

(: f (All (A) (A -> (Listof A))))
(define (f a)
 ...)

but f calls some polymorphic function and ts can't infer that the
parameter is A, so I have to re-write it to:

(define: (A) (f [a : A]) : (Listof A)
 ...)

to get the A in scope.

Jay

On Tue, Feb 23, 2010 at 3:09 PM, Sam Tobin-Hochstadt <samth at ccs.neu.edu> wrote:
> In the current SVN version, and in the next release, Typed Scheme now
> has a new name.  Typed modules should now use the language
> `typed/scheme', or `typed/scheme/base', like this:
>
> #lang typed/scheme
> (: x Number)
> (define x 7)
>
> The `typed/scheme' language is like `scheme', but checked, and
> `typed/scheme/base' is like `scheme/base'.  I hope to add `typed/'
> versions of additional languages in the future.
>
> This change also brings with it a refactoring of the numeric hierarchy
> in Typed Scheme.  Numbers are now given more precise types, and
> several functions (such as `vector-ref') require more precise types.
> The existing `typed-scheme' language will continue to work as it did
> previously.
>
> Finally, the new release comes with a rewritten version of the guide
> to Typed Scheme, available soon at
> http://pre.plt-scheme.org/docs/html/ts-guide/.  I'm very interested in
> feedback on the new guide.
> --
> sam th
> samth at ccs.neu.edu
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>



-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://teammccarthy.org/jay

"The glory of God is Intelligence" - D&C 93


Posted on the users mailing list.