[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with "map"

CLISP Users:

I am using the latest version of CLISP for Win32s on Win95, and
encounter a small problem that I think may be a bug.  It centers around
use of the "map" function the following way.


(defun set-avariable-constraint (csp c)
  ;; Set avariable, iv1 and iv2 slots
  (with-struct (constraint- variables arity) c
    (let ((vs (map '(simple-array subscript 1)      <---- problem here
     #'(lambda (v) (position1 v (csp-variables csp)))
      (setf (constraint-avariable c) vs)
      (case arity
 (1 (setf (constraint-iv1 c) (aref vs 0)))
 (2 (setf (constraint-iv1 c) (aref vs 0))
    (setf (constraint-iv2 c) (aref vs 1)))))))


(defstruct (constraint ...

  ;; For binary and n-ary constraints : array of variable subscripts for

variables on
  ;; which the constraint holds.  Analogous to the `variables' slot but
array instead of
  ;; list, and subscripts instead of structures.
  (avariable (make-array 1 :element-type 'subscript) :type (simple-array
subscript 1))

This is part of a system written by Michel Lemaitre and is available
from http://news.cert.fr/anglais/deri/lemaitre/

This software is written in (ANSI) Common Lisp.

When I run (small-demo), the program progresses through "component
Preparation" and stops with an error about "(SIMPLE-ARRAY SUBSCRIPT 1)
not an available type".

Is there some way I can get around this if it is a ANSI non-compliance


Warren Lucas