choose-lang:   Pick #lang at read-time
7.7

choose-lang: Pick #lang at read-time

Meta-language for selecting a #lang as the module is initially read.

For example, the following module raises a type error if the environment variable CHOOSE_TYPES is set, and otherwise ignores the type annotation.

#lang choose-lang (if (getenv "CHOOSE_TYPES") typed/racket typed/racket/no-check)
 
(: f Integer)
(define f 'foo)