[Ecls-list] Error on compiling type declarations without the type

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Fri Jul 11 17:52:59 UTC 2008

On Fri, Jul 11, 2008 at 7:47 PM, Zach <elzacho at gmail.com> wrote:
> Hey, list,
> I only did a cursory search through the bug tracker and list archive so
> sorry if this is a known issue...
> Compilation of functions that contain type declarations of unions which omit
> `type' from the car of the declaration appear not to work in ecl-0.9{i,j,k}
> (I pulled k from git on 7-10-2008).  E.g (declare (type (or type1 type2)
> var)) seems to work fine, but without the `type': (declare ((or type1 type2)
> var)) signals an error on compile.  This comes up if you want to build
> Alexandria.  I didn't know it was valid CL to drop the `type', but after
> looking at the spec, it seems that it is.  See the (attempted) compilation
> of FUNC2 below.

I am afraid this is not valid Common Lisp

identifier n. 1. a symbol used to identify or to distinguish names. 2.
a string used the same way.

name n., v.t. 1. n. an identifier by which an object, a binding, or an
exit point is referred to by association using a binding. 2. v.t. to
give a name to. 3. n. (of an object having a name component) the
object which is that component. ``The string which is a symbol's name
is returned by symbol-name.'' 4. n. (of a pathname) a. the name
component, returned by pathname-name. b. the entire namestring,
returned by namestring. 5. n. (of a character) a string that names the
character and that has length greater than one. (All non-graphic
characters are required to have names unless they have some
implementation-defined attribute which is not null. Whether or not
other characters have names is implementation-dependent.)

declaration identifier n. one of the symbols declaration,
dynamic-extent, ftype, function, ignore, inline, notinline, optimize,
special, or type; or a symbol which is the name of a type; or a symbol
which has been declared to be a declaration identifier by using a
declaration declaration.

Hence (OR ...) is not a valid type name and thus is not allowed.


Facultad de Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 28040 (Spain)

More information about the ecl-devel mailing list