>> While compiling expression: >> ERROR: In procedure vector-length: Wrong type argument in position 1 >> > > Oh, and I forgot to mention -- the error appears when I try > to apply these funtions to regular (non-typed) array with rank > 1. > It works for typed arrays, vectors and uvecs. > > I'll try to look for the reason of this and let you know if I find > anything interesting. > > Regards, > M.
Hi, I posted a patch for precisely this error yesterday on bug-guile. It's a trivial bug in module/language/glil/compile-assembly.scm, but I don't know why array.test didn't catch it. 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 Regards, Daniel.