[racket] typed racket and new racket languages?

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Thu Jun 16 21:00:44 EDT 2011

You can write your own language on top of Typed Racket quite easily.
For example, in Matthias' recent post [1], if you change:

#lang racket

  (count-forms mexpr ...)
  (#%module-begin ---stuff---))


#lang racket

(require (prefix-in tr: typed/racket))

  (count-forms mexpr ...)
  (tr:#%module-begin ---stuff---))

Now you have a typed version of his language.  For more complex
languages, things may be a bit trickier, since you need to arrange for
the generated code to be well-typed.  But this general strategy works;
see David Van Horn's prototype typed student languages [2] for a
bigger example.

[1] http://www.ccs.neu.edu/home/matthias/Thoughts/Racket_is____.html
[2] https://github.com/dvanhorn/typed-student
On Thu, Jun 16, 2011 at 2:54 PM, Raoul Duke <raould at gmail.com> wrote:
> hi,
> to what degree can one leverage typed racket for new languages in the
> racket ecosystem? tho i read that even if there are ways to use it,
> there be dragons in terms of getting the new language just right wrt
> type enforcement.
> thanks.
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users

sam th
samth at ccs.neu.edu

Posted on the users mailing list.