Re: [racket-users] Creating a language that extends typed/racket

2015-08-30 Thread Alexander D. Knauth

 On Aug 30, 2015, at 6:31 PM, Alexis King lexi.lam...@gmail.com wrote:
 
 (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.)

Yes. What came out of it was this, which they got to work:
https://github.com/khinsen/racket-typed-lang

 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 Users group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to racket-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
Racket Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Creating a language that extends typed/racket

2015-08-30 Thread Alexis King
(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 Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.