Skip to content

Commit

Permalink
improve error location (emina#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
sorawee authored Apr 9, 2022
1 parent 1d042d1 commit 5369537
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rosette/lib/destruct.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@

(define-simple-macro (destruct val [pat:clause-pattern e:expr ...+] ...)
#:do [(for-each check-duplicate-identifier! (attribute pat.id-set))]
#:with match-expr (syntax/loc this-syntax (match var [pat (begin e ...)] ...))
#:with result
(syntax/loc this-syntax
(for/all ([var val]);(guarded-values val)])
(match var [pat (begin e ...)] ...)))
match-expr))
result)

(define-simple-macro (destruct* (val ...) [(pat:clause-pattern ...) e:expr ...+] ...)
Expand Down

0 comments on commit 5369537

Please sign in to comment.