The cl-reexport Reference Manual

This is the cl-reexport Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:19:26 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 cl-reexport

Reexport external symbols in other packages.

Author

Masayuki Takagi

License

LLGPL

Long Description

# Cl-Reexport

Cl-reexport makes a package reexport symbols which are external symbols in other packages. This fanctionality is intended to be used with (virtual) hierarchical packages. For detail, see Usage section.

## Usage

Think about a (virutal) hierarchical package structure. Since Common Lisp standard has just a flat package system, the three packages are naturally at the same level, but you can regard the packages constituting a hierarchy virtually.

FOO-package
- FOO-PACKAGE.BAR
- FOO-PACKAGE.BAZ

Here, their definitions are:

(in-package :cl-user)

(defpackage foo-package.bar
(:use :cl)
(:export :x))

(defpackage foo-package.baz
(:use :cl)
(:export :y))

(defpackage foo-package
(:use :cl))

If you want reexport external symbols in FOO-PACKAGE.BAR and FOO-PACKAGE.BAZ from FOO-PACKAGE, you may just write as below:

(in-package :foo-package)
(cl-reexport:reexport-from :foo-package.bar)
(cl-reexport:reexport-from :foo-package.baz)

(in-package :cl-user)

(describe ’x)
>> FOO-PACKAGE.BAR:X
>> [symbol]

(describe ’y)
>> FOO-PACKAGE.BAZ:Y
>> [symbol]

### :INCLUDE and :EXCLUDE options

You can also reexport the only symbols you specify or the symbols other than you specify using :INCLUDE option or :EXCLUDE option. Since they are exclusive, you can not use :INCLUDE option and :EXCLUDE option at the same time.

(in-package :cl-user)

(defpackage bar-package.a
(:use :cl)
(:export :x :y :z))

(defpackage bar-package.b
(:use :cl)
(:export :p :q :r))

(defpackage bar-package
(:use :cl))

(in-package :bar-package)

(cl-reexport:reexport-from :bar-package.a
:include ’(:x))

(cl-reexport:reexport-from :bar-package.b
:include ’(:p))

(in-package :cl-user)

(do-external-symbols (x :bar-package)
(print x))
>> BAR-PACKAGE.A:X
>> BAR-PACKAGE.B:Q
>> BAR-PACKAGE.B:R

## Installation

You can install ‘cl-reexport‘ via Quicklisp:

(ql:quicklisp :cl-reexport)

## Difference from ASDF 3’s one-package-per-file fanctionality

ASDF 3 has one-package-per-file fanctionality and its runtime support. The structural difference between (virtual) hierarchical packages and ASDF 3’s one-package-per-file fanctionality is:

* (Virtual) hierarchical packages have one system definition and several packages constitute a hierarchical structure.
* ASDF 3’s one-package-per-file style has hierarchical system definitions and hierarchical packages, whcih are corresponding each other.

When you use former style, you can use cl-reexport.

## Author

* Masayuki Takagi (kamonama@gmail.com)

## Copyright

Copyright (c) 2014 Masayuki Takagi (kamonama@gmail.com)

## License

Licensed under the LLGPL License.

Version

0.1

Dependency

alexandria (system).

Source

cl-reexport.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 cl-reexport/src

Source

cl-reexport.asd.

Parent Component

cl-reexport (system).

Child Component

cl-reexport.lisp (file).


4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 cl-reexport/cl-reexport.asd

Source

cl-reexport.asd.

Parent Component

cl-reexport (system).

ASDF Systems

cl-reexport.

Packages

cl-reexport-asd.


4.1.2 cl-reexport/src/cl-reexport.lisp

Source

cl-reexport.asd.

Parent Component

src (module).

Packages

cl-reexport.

Public Interface

reexport-from (function).

Internals

5 Packages

Packages are listed by definition order.


5.1 cl-reexport-asd

Source

cl-reexport.asd.

Use List
  • asdf/interface.
  • common-lisp.

5.2 cl-reexport

Source

cl-reexport.lisp.

Use List

common-lisp.

Public Interface

reexport-from (function).

Internals

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Ordinary functions

Function: reexport-from (package-from &key include exclude)
Package

cl-reexport.

Source

cl-reexport.lisp.


6.2 Internals


6.2.1 Ordinary functions

Function: exclude-symbols (exclude symbols)
Package

cl-reexport.

Source

cl-reexport.lisp.

Function: external-symbols (package)
Package

cl-reexport.

Source

cl-reexport.lisp.

Function: include-symbols (include symbols)
Package

cl-reexport.

Source

cl-reexport.lisp.


Appendix A Indexes


A.1 Concepts


A.3 Variables