Skip to content

regression on require/typed #34

@capfredf

Description

@capfredf

It looks like the macro-stepper has had some issues with the following code since version 7.6

#lang racket
(module untyped racket
  (provide foo?)
  (define (foo? x) x))
(module typed typed/racket
  (require/typed (submod ".." untyped)
    [foo? (-> Number Number)])
  (provide foo?))

the error message is

Internal error:
rename: different contours!
  contour-diff: (#s(DIFF #%app begin) #s(DIFF apply-contract (define-values (lifted/2) (quote-module-name))) #s(DIFF lifted/1 (#%app apply-contract lifted/1 foo? (quote (interface for foo?)) lifted/2 (quote foo?) (#%app kernel:srcloc (quote "/Users/capfredf/code/racket-extra-pkgs/typed-racket/test.rkt") (quote 9) (quote 5) (quote 151) (quote 4)) (quote #f))) . #s(DIFF (foo? (quote (interface for foo?)) lifted/2 (quote foo?) (#%app kernel:srcloc (quote "/Users/capfredf/code/racket-extra-pkgs/typed-racket/test.rkt") (quote 9) (quote 5) (quote 151) (quote 4)) (quote #f)) ()))
  pre:  #<syntax:...racket-installers/Racket v7.6/share/pkgs/typed-racket-lib/typed-racket/utils/require-contract.rkt:59:16 (#%app apply-contract lifted/1 foo? (quote (interface for foo?)) lifted/2 (quote foo?) (#%app kernel:srcloc (quote "/Users/capfredf/code/racket-extra-pkgs/typed-racket/test.rkt") (quote 9) (quote 5) (quote 151) (quote 4)) (quote #f))>
  post: #<syntax (begin (define-values (lifted/2) (quote-module-name)) (#%app apply-contract lifted/1 foo? (quote (interface for foo?)) lifted/2 (quote foo?) (#%app kernel:srcloc (quote "/Users/capfredf/code/racket-extra-pkgs/typed-racket/test.rkt") (quote 9) (quote 5) ...>

I’ve tried v7.4, 7.5, 7.6, 7.7 and the latest build on macOS 10.14.16.
v7.4 and v7.5 worked fine

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