[racket] Defining a typed language
Hmm, that surprises me; I'll take a look.
Sam
On Oct 17, 2014 8:25 AM, "Konrad Hinsen" <konrad.hinsen at fastmail.net> wrote:
> Sam Tobin-Hochstadt writes:
> > You should keep the original require and provide, and add the new
> inserted require as an
> > extra. Does that work?
>
> That's easy to check:
>
> -- test-lang/main.rkt ----------------------------
> #lang typed-racket/minimal
>
> (require typed/racket
> test-lang/more
> (only-in typed/racket
> [#%module-begin tr:module-begin]
> [require tr:require]))
>
> (provide (except-out (all-from-out typed/racket) #%module-begin)
> (rename-out [module-begin #%module-begin])
> (all-from-out test-lang/more))
>
> (define-syntax module-begin
> (syntax-rules (require)
> [(_ decl ...)
> (tr:module-begin
> (require test-lang/more)
> decl ...)]))
> --------------------------------------------------
>
> But now I am back to my original error message:
>
> ; test-lang/more.rkt:4:9: Type Checker: missing type for identifier;
> ; consider using `require/typed' to import it
> ; identifier: bar
> ; from module: test-lang/more
> ; in: bar
>
> My new friend, the Macro Stepper, now says about 'bar':
>
> Apparent identifier binding
> in phase 0:
> defined in: test-lang/more
> as: bar.4
> imported from: test-lang/main
>
> Konrad.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20141017/b09b561f/attachment-0001.html>