racket / macro-debugger

Other
8 stars 16 forks source link

regression on require/typed #34

Open capfredf opened 4 years ago

capfredf commented 4 years ago

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

capfredf commented 3 years ago

ping @rmculpepper

sorawee commented 2 years ago

Just encountered this issue as well.