Typed Racket: require macros from untyped modules

15 views
Skip to first unread message

unlimitedscolobb

unread,
Jan 3, 2021, 3:22:16 PM1/3/21
to Racket Users
Hello,

How can I require macros coming from untyped modules into typed modules?

Intuitively I'd expect that to be possible in a way or another because such imports don't seem to violate any safety guarantees, but maybe I'm missing something.

-
Sergiu

unlimitedscolobb

unread,
Jan 3, 2021, 3:54:17 PM1/3/21
to Racket Users
I continued doing various tests and realized that my problem was something else, since the following code works:

#lang typed/racket

(module untyped-submodule racket
  (provide a macro)
  (define a 2)
  (define-syntax-rule (macro arg) (+ 1 arg)))

(require 'untyped-submodule)

(macro 3)

Using a in the enclosing module doesn't work (a is required without a type), but macro works fine.

Getting back to thinking and trying.

-
Sergiu
Reply all
Reply to author
Forward
0 new messages