UNSUPPORTED. UNSTABLE. INCOMPLETE. trivial-declaration-identifiers provides a compatibility layer enabling one to determine whether or not a certain symbol has been declared as a declaration, whether by the Common Lisp standard, the currently running implementation, or the user. This compatibility layer is based on the principle of "progressive …
Common Lisp
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
backend
doc
.gitignore
README
UNLICENSE
frontend.lisp
package.lisp
trivial-declaration-identifiers.asd
type-specifiers.lisp

README

Project's home: http://www.hexstreamsoft.com/projects/trivial-declaration-identifiers/


trivial-declaration-identifiers provides a compatibility layer
enabling one to determine whether or not a certain symbol has been
declaimed as a declaration identifier (excluding types), whether by
the Common Lisp standard, the currently running implementation, or the
user. This compatibility layer is based on the principle of
"progressive enhancement", and offers portable baseline functionality
that can be enhanced to full support with a small bit of cooperation
between the implementation and this library. Other ways of
(re-)declaring declaration identifiers manually are also provided as a
stopgap measure.

All Common Lisp implementations inherently have such functionality
available internally, or at least it shouldn't be too hard to add.
Common Lisp implementors are encouraged to expose this functionality
(if not already done) and integrate it with this library.


This first version implements only the baseline functionality and has
no implementation-specific support yet. However, interested users can
already start using the library, knowing they will benefit from future
implementation-specific support with no code changes on their end.


One distinguished use-case for accessing such functionality is correct
parsing of declarations. It's not possible, relying solely on the
standard, to reliably (or sanely) determine whether a declaration
specifier of the form (foo bar), where FOO is not a declaration
identifier known to the declarations processor, is equivalent to (type
foo bar) or is a FOO declaration. As putting the right type
declarations in the right places is one of the most basic forms of
declarations processing one might want to do, not having such
functionality is a significant shortcoming. (For this reason, it's
arguably best to avoid using the type declaration abbreviation feature
in new code.)


Architecture Overview
---------------------

frontend
    v
 backend <--------------------- backend-services
    ^--- backend-implementation ---^

This library is composed of 4 different packages, collaborating
closely together. See the packages.lisp file for the full list of
exported symbols for each package.


Frontend Overview
-----------------

package: trivial-declaration-identifiers

Exposes functionality to the user conveniently,
enhancing behavior provided by the backend.


Backend Overview
----------------

package: trivial-declaration-identifiers_backend

Common symbols for frontend/backend-implementation communication.

This is the "backend interface", used by the frontend
and implemented by the backend-implementation.


Backend-implementation Overview
-------------------------------

package: trivial-declaration-identifiers_backend-implementation

Implements default (portable) and implementation-specific (optional) support.


Backend-services Overview
-------------------------

package: trivial-declaration-identifiers_backend-services

Used by the backend-implementation to enable functionality.


Frontend Details
----------------

"Normal" users of the library only need to know about the frontend.
Here's all the exported functionality:


Function DECLARATION-IDENTIFIER-P object &key extendedp
  => ?


Function (SETF DECLARATION-IDENTIFIER-HINT) new-hint symbol
  => new-hint

Function MAP-DECLARATION-IDENTIFIERS result-type function

Function DECLARATION-IDENTIFIER-LISTENER listener-name

Function (SETF DECLARATION-IDENTIFIER-LISTENER) new-function-designator listener-name

Function ABBREVIATED-TYPE-DECLARATIONS-POLICY
  => policy

Function (SETF ABBREVIATED-TYPE-DECLARATIONS-POLICY) new-policy
  => new-policy


Backend Details
---------------




This library is in the Public Domain.
See the UNLICENSE file for details.