[Ecls-list] Error on compiling type declarations without the type
elzacho at gmail.com
Fri Jul 11 20:04:44 UTC 2008
Thanks for the answer. It definitely seems like there is a bit of ambiguity
> 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.
Ugh, I have always thought the spec reads like a legal document. But this
seems pretty clear, it has to be a symbol naming a type or a symbol that is
declared to be a declaration identifier (I am unfamiliar with the what the
latter is talking about, but I think that it isn't pertinent). But this
seems to contradict that:
(type *typespec* *var****)
*typespec*---a *type specifier*.
*var*---a *variable* *name*.
...and from the glossary...
*type specifier* *n.* an *expression* that denotes a *type*. ``The symbol
random-state, the list (integer 3 5), the list (and list (not null)), and
the class named standard-class are type specifiers.''
Which is where I got the impression I had. Also, it seems that X3J13 clean
up issue TYPE-DECLARATION-ABBREVIATION:ALLOW-ALL has something to say
regarding with which type specifiers one may omit `type' (i.e. it proposes
to allow any and all type specifiers including (or a b)). Is this still not
valid Ansi CL (even X3J13 Ansi CL)?
This is completely academic and a bit ludicrous to argue about, really.
Inserting a `type' everywhere I get these errors would fix things. I was
just bringing up a seeming non-conformance.
Thanks for your time,
On Fri, Jul 11, 2008 at 11:52 AM, Juan Jose Garcia-Ripoll <
juanjose.garciaripoll at googlemail.com> wrote:
> 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
> > `type' from the car of the declaration appear not to work in
> > (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
> > 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)
> > 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.)
> 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)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ecl-devel