unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Daniel Llorens <daniel.llorens@bluewin.ch>
To: bug-guile@gnu.org
Subject: bug in read syntax for arrays
Date: Mon, 5 Sep 2011 11:29:47 +0200	[thread overview]
Message-ID: <451982B8-1CD2-4484-BB9E-D62E70CD3951@bluewin.ch> (raw)

[-- Attachment #1: Type: text/plain, Size: 358 bytes --]


In the latest git,

scheme@(guile-user)> #0(1)
While executing meta-command:
ERROR: Wrong type argument in position 1: #0(1)

The trivial patch attached fixes this problem. However make check passes without the patch, even though arrays.test contains the offending syntax #2((1 2) (3 4) (5 6)). I haven't looked into that.

Regards,

	Daniel.


[-- Attachment #2: 0001-Fix-compilation-of-untyped-arrays-of-rank-not-1.patch --]
[-- Type: application/octet-stream, Size: 1135 bytes --]

From 1dc54535b8cfc63606f190971d15072cedd28de7 Mon Sep 17 00:00:00 2001
From: Daniel Llorens <daniel.llorens@bluewin.ch>
Date: Mon, 5 Sep 2011 11:09:08 +0200
Subject: [PATCH] Fix compilation of untyped arrays of rank not 1

* module/language/glil/compile-assembly.scm: vector-fold2 expects vector.
---
 module/language/glil/compile-assembly.scm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/module/language/glil/compile-assembly.scm b/module/language/glil/compile-assembly.scm
index a081822..c76e412 100644
--- a/module/language/glil/compile-assembly.scm
+++ b/module/language/glil/compile-assembly.scm
@@ -856,7 +856,7 @@
             (vector-fold2 (lambda (x codes addr)
                             (receive (subcode addr) (ref-or-dump x i addr)
                               (values (cons subcode codes) addr)))
-                          x '() addr)
+                          contents '() addr)
           (receive (shape addr) (ref-or-dump (array-shape x) i addr)
             (values (fold append
                           (let ((len (vector-length contents)))
-- 
1.7.1


             reply	other threads:[~2011-09-05  9:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-05  9:29 Daniel Llorens [this message]
2011-09-19 23:50 ` bug#9556: bug in read syntax for arrays Andy Wingo
2011-09-21  7:44   ` Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=451982B8-1CD2-4484-BB9E-D62E70CD3951@bluewin.ch \
    --to=daniel.llorens@bluewin.ch \
    --cc=bug-guile@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).