[plt-scheme] Scheme Hackathon at ICFP 2009?

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Fri Oct 17 14:10:31 EDT 2008

Here is the basic idea of porting, with check-expect because someone  
asked:

> #lang scheme/load
>
> (module original scheme
>   ;; f (Symbol -> Boolean)
>   (define (f s)
>     (cond
>       [(eq? 'true s) #t]
>       [(eq? 'false s) #f]
>       [else (error 'f "bad symbol")]))
>
>   (provide f))

converted module

> (module a typed-scheme
>   (: f (Symbol -> Boolean))
>   (define (f s)
>     (cond
>       [(eq? 'true s) #t]
>       [(eq? 'false s) #f]
>       [else (error 'f "bad symbol")]))
>
>   (provide f))
>

design separate external test module

> (module b scheme
>   (require 'original) ;; <== change this from 'original to 'a
>   (require htdp/testing)
>
>   (check-expect (f 'true) #t)
>   (check-expect (f 'false) #f)
>   (check-error (f 'wahr) "f: bad symbol")
>
>   (generate-report))
>
> (require 'b)


;; ---

> Does this mean that programming using typed scheme is preferable to
> doing it untyped?

This is and will remain your choice.

;; ---

> Does this mean that DrScheme is being ported to typed scheme?

Sam TH's dissertation includes a large software experiment to  
validate that Typed Scheme is widely useful. He has already ported  
parts of a couple of modules and he may do more. He may port more of  
drscheme or of other PLT Scheme applications.

Our real goal is to create adapters for as many plain Scheme modules  
as possible in order to make programming in Typed Scheme as easy as  
it is in PLT Scheme.

-- Matthias







Posted on the users mailing list.