Skip to content

Commit

Permalink
improve source location for an error message
Browse files Browse the repository at this point in the history
  • Loading branch information
rfindler committed Jan 21, 2024
1 parent 61fa7b0 commit 4d58afd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions redex-lib/redex/private/binding-forms-compiler.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
(let-values
([(_ sub-bspec betas+ellipses)
(surface-bspec->pat&bspec
#`((#,sub export-name #:refers-to imports) #:exports exports)
(quasisyntax/loc #'sbspec-sub ((#,sub export-name #:refers-to imports) #:exports exports))
form-name)])
(for ([beta+ellipsis (in-list betas+ellipses)])
;; add `ellipsis-depth` ellipses around the ones that
Expand Down Expand Up @@ -319,8 +319,8 @@
(lambda (lhs rhs) (equal? (first lhs) (first rhs))))))

(define (check-referrents names-and-depths)
(for/list ([name-and-depth (in-list names-and-depths)])
(unless (assoc (first name-and-depth) pattern-names)
(for ([name-and-depth (in-list names-and-depths)])
(unless (assoc (first name-and-depth) pattern-names)
(raise-syntax-error
(syntax-e form-name)
(format "unknown name imported or exported: ~a" (first name-and-depth))
Expand Down

0 comments on commit 4d58afd

Please sign in to comment.