diff --git a/collects/macro-debugger/model/reductions.rkt b/collects/macro-debugger/model/reductions.rkt index 925d3f2..2eb58fb 100644 --- a/collects/macro-debugger/model/reductions.rkt +++ b/collects/macro-debugger/model/reductions.rkt @@ -1,5 +1,6 @@ #lang racket/base (require racket/match + (for-syntax racket/base) "../util/eomap.rkt" "stx-util.rkt" "deriv-util.rkt" @@ -34,9 +35,16 @@ ;; Syntax -(define-syntax-rule (match/count x . clauses) +(define-syntax-rule (match/count x clause ...) (begin (sequence-number (add1 (sequence-number))) - (match x . clauses))) + (let ([v x]) + (match v + clause ... + [_ (error 'match "failed to match ~e at line ~s" v (line-of x))])))) + +(define-syntax (line-of stx) + (syntax-case stx () + [(line-of x) #`(quote #,(syntax-line #'x))])) ;; Derivations => Steps @@ -472,7 +480,10 @@ ;; Add remark step? ]] [(struct local-remark (contents)) - (R [#:reductions (list (walk/talk 'remark contents))])])) + (R [#:reductions (list (walk/talk 'remark contents))])] + + [#f + (R)])) ;; List : ListDerivation -> RST (define (List ld) diff --git a/collects/macro-debugger/model/yacc-interrupted.rkt b/collects/macro-debugger/model/yacc-interrupted.rkt index 9e8d2a5..944b9cc 100644 --- a/collects/macro-debugger/model/yacc-interrupted.rkt +++ b/collects/macro-debugger/model/yacc-interrupted.rkt @@ -1,6 +1,6 @@ #lang racket/base (require (for-syntax racket/base - unstable/syntax) + racket/syntax) "yacc-ext.rkt") (provide ! ? !! define-production-splitter diff --git a/collects/macro-debugger/syntax-browser/widget.rkt b/collects/macro-debugger/syntax-browser/widget.rkt index fd75cdd..b84fddc 100644 --- a/collects/macro-debugger/syntax-browser/widget.rkt +++ b/collects/macro-debugger/syntax-browser/widget.rkt @@ -117,8 +117,8 @@ (send -text change-style clickback-style a b))))) (define/public (add-syntax stx - #:binders [binders #f] - #:shift-table [shift-table #f] + #:binders [binders '#hash()] + #:shift-table [shift-table '#hash()] #:definites [definites #f] #:hi-colors [hi-colors null] #:hi-stxss [hi-stxss null] diff --git a/collects/macro-debugger/view/step-display.rkt b/collects/macro-debugger/view/step-display.rkt index 51259a6..d2f6f7d 100644 --- a/collects/macro-debugger/view/step-display.rkt +++ b/collects/macro-debugger/view/step-display.rkt @@ -84,9 +84,9 @@ (show-poststep step shift-table)])) (define/public (add-syntax stx - #:binders [binders #f] + #:binders [binders '#hash()] #:definites [definites #f] - #:shift-table [shift-table #f]) + #:shift-table [shift-table '#hash()]) (send/i sbview sb:syntax-browser<%> add-syntax stx #:binders binders #:definites definites