Skip to content

Misleading error when using a macro from typed/racket in typed/racket/shallow #1469

@NoahStoryM

Description

@NoahStoryM

What version of Racket are you using?
8.18 [cs]

What program did you run?

#lang typed/racket/shallow

(module m typed/racket
  (provide (all-defined-out))
  (define-syntax-rule (1+ n) (add1 n)))
(require 'm)

(displayln (1+ 0))

What should have happened?
I think the program should run successfully and print 1, similar to this one:

#lang typed/racket/optional

(module m typed/racket/shallow
  (provide (all-defined-out))
  (define-syntax-rule (1+ n) (add1 n)))
(require 'm)

(displayln (1+ 0))

If this usage is intentionally disallowed, the error message should be more precise about the interaction between typed/racket and typed/racket/shallow.

If you got an error message, please include it here.

Type Checker: Macro 1+ from typed module used in untyped code
  in: (1+ 0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions