Add "transient" intmap interface
[bpt/guile.git] / module / ice-9 / match.upstream.scm
index 29f9dbe..ede1d43 100644 (file)
   (syntax-rules (=>)
     ;; no more clauses, the match failed
     ((match-next v g+s)
-     (error 'match "no matching pattern"))
+     ;; Here we call error in non-tail context, so that the backtrace
+     ;; can show the source location of the failing match form.
+     (begin
+       (error 'match "no matching pattern" v)
+       #f))
     ;; named failure continuation
     ((match-next v g+s (pat (=> failure) . body) . rest)
      (let ((failure (lambda () (match-next v g+s . rest))))