(Disclaimer: I think this question may have been visited before on this mailing 
list, but I couldn’t find any resolution, so I’m going to ask again.)

I would like to write a language that extends typed/racket or 
typed/racket/base. Specifically, I have a collection, called “envy”. I would 
like to create a `#lang envy` that is just like #lang typed/racket/base, but 
also includes (all-from-out envy). My first instinct was just to create a 
language using syntax/module-reader, along with a simple module language:

   #lang typed/racket/base
   (require envy)
   (provide (all-from-out envy typed/racket/base))

Unfortunately, this doesn’t work. The `envy` module defines a macro called 
`define-environment`, but attempting to use it in this `#lang envy` fails:

   Type Checker: Macro define-environment from typed module used in untyped 
code in: (define-environment)

So that doesn’t work. For some reason, the typechecker thinks `#lang envy` is 
untyped (though it seems to typecheck properly when not using macros). However, 
I realized that `#lang typed/racket` is a module language that obviously 
extends typed/racket/base. It uses typed-racket/minimal, but using that instead 
of typed/racket/base didn’t alleviate my problem.

Is it possible to create a custom language that extends typed/racket/base? How 
does typed/racket itself do it?

Alexis

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-dev/A3F89F4B-BDA4-41A8-80DC-4A6F63823916%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to