3.10: Problems when using non-Allegro CL programs

There is Common Lisp code, much freely available, which can be used with Allegro CL to provide additional functionality. One example is cl-http, which we discuss in Faq entry 3-6. This section of the FAQ deals with problems encountered using other non-Allegro CL programs. Usually the problem and the solution are simple.

Q 3.10-1) When I try to use the series package in the common-lisp-user package, a get a symbol conflict with until. Why and how can I fix it?

Go to main FAQ page.


Q 3.10-1) When I try to use the series package in the common-lisp-user package, a get a symbol conflict with until. Why and how can I fix it?

A 3.10-1) Series is described in Appendix A of Common Lisp: the Language (2nd ed.), where it says

A series is a data structure much like a sequence, with similar kinds of operations. The difference is that in many situations, operations on series may be composed functionally yet execute iteratively, without the need to construct intermediate series values explicitly.

Series is not part of Common Lisp, but implementations of it are available. In a series implementation, the function until is defined. Typically, in implementations of Series, symbols naming associated functionality are in a package named series. But until is also a symbol in the excl package in Allegro CL (implementing a when-like macro previously defined in Allegro CL 3.0 on Windows) and the excl package is used by most Allegro CL packages, including common-lisp-user. Therefore, when one tries to evaluate the following:

(use-package :series (find-package :common-lisp-user))

in an Allegro CL into which such a Series implementation is loaded, a continuable error is signaled:

cl-user(6): (use-package :series) 
Error: Using package `foo' results in name conflicts for these symbols: until 
     [condition type: package-error] 
Restart actions (select using :continue): 
  0: Unintern the conflicting symbols in the `series' package. 
  1: Return to Top Level (an "abort" restart) 
  [...] 

At this point, entering

:cont 0

does what you want (make unqualified until mean series:until), despite the poor wording of the message (see 2.5 Using package [package] results in name conflicts... in errors.htm).

However, you can avoid the error entirely by evaluating

(shadowing-import '(until) :common-lisp-user)

Thus:

cl-user(8): (shadowing-import '(until) :common-lisp-user)
t 
cl-user(9): (use-package :series) 
t 
cl-user(10): (describe 'until) 
until is a symbol. 
  It is unbound. 
  It is external in the series package and accessible in the common-lisp-user package. 
  ...
cl-user(11): 

© Copyright 2000, 2001, Franz Inc., Berkeley, CA.  All rights reserved.
$Revision: 1.1.2.1 $