Closed sorawee closed 3 years ago
Consider:
#lang racket (require (for-syntax syntax/apply-transformer)) (begin-for-syntax (define (test stx) (raise 1))) (define-syntax (foo stx) (with-handlers ([number? (λ (exn) #'1)]) (local-apply-transformer test #'1 'expression))) (foo)
(foo) expands to 1 as expected, but the macro stepper fails with the error:
(foo)
1
Internal error: add-step: contract violation expected: protostep? given: (list (remarkstep 'remark (state #f '() '(#<procedure:...r/model/context.rkt:129:0>) '(#<bigframe> #<bigframe>) '#hasheq((#<syntax with-handlers-handler2> . 1) (#<syntax:Users/sorawee/projects/mixfix/test.rkt:6:16 stx> . 1) (#<syntax with-handlers-predi... in: the 1st argument of (->* (protostep?) (any/c) void?) contract from: <pkgs>/macro-debugger-text-lib/macro-debugger/model/reductions-util.rkt blaming: <pkgs>/macro-debugger-text-lib/macro-debugger/model/reductions.rkt (assuming the contract is correct) at: <pkgs>/macro-debugger-text-lib/macro-debugger/model/reductions-util.rkt:95.3
Consider:
(foo)
expands to1
as expected, but the macro stepper fails with the error: