I've been following the development of Guile for years, and firstly congratulations on Guile 2.0. It really is a masterpiece.

Amongst other things, I quite enjoy using ",disassemble" to see what the VM generation is doing, but maybe I shouldn't go on too much about my hobbies. Anyhow, I noticed a place where error is used without format, resulting in a garbled error message:

scheme@(guile-user)> (define x 1)
scheme@(guile-user)> ,disassemble x
Disassembly of 1:

While executing meta-command:
ERROR: can't decompile ~A: not a program or objcode 1

Here's a tiny patch to add the format to the error statement.


From: Andrew Horton <andrew.j.hor...@gmail.com>
Date: Sat, 19 Mar 2011 12:11:18 +0000
Subject: [PATCH] Use format in the error string for decompile-value.

---
 module/language/objcode/spec.scm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/module/language/objcode/spec.scm b/module/language/objcode/spec.scm
index bbd7454..349be0d 100644
--- a/module/language/objcode/spec.scm
+++ b/module/language/objcode/spec.scm
@@ -71,7 +71,7 @@
    ((objcode? x)
     (values x #f))
    (else
-    (error "can't decompile ~A: not a program or objcode" x))))
+ (error (format #f "can't decompile ~A: not a program or objcode" x)))))

 (define-language objcode
   #:title      "Guile Object Code"
--
1.7.4.1.227.gadfe4

Reply via email to