diff options
Diffstat (limited to 'module/srfi/srfi-43.scm')
-rw-r--r-- | module/srfi/srfi-43.scm | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/module/srfi/srfi-43.scm b/module/srfi/srfi-43.scm index 153b0cbcd..e1bf19e9d 100644 --- a/module/srfi/srfi-43.scm +++ b/module/srfi/srfi-43.scm @@ -1,6 +1,6 @@ ;;; srfi-43.scm -- SRFI 43 Vector library -;; Copyright (C) 2014 Free Software Foundation, Inc. +;; Copyright (C) 2014, 2018 Free Software Foundation, Inc. ;; ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public @@ -41,10 +41,14 @@ (cond-expand-provide (current-module) '(srfi-43)) -(define (error-from who msg . args) - (apply error - (string-append (symbol->string who) ": " msg) - args)) +(define-syntax error-from + (lambda (stx) + (syntax-case stx (quote) + ((_ 'who msg arg ...) + #`(error #,(string-append (symbol->string (syntax->datum #'who)) + ": " + (syntax->datum #'msg)) + arg ...))))) (define-syntax-rule (assert-nonneg-exact-integer k who) (unless (and (exact-integer? k) |