The trivialib.type-unify Reference Manual

This is the trivialib.type-unify Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 18:09:34 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 trivialib.type-unify

unifies a polimorphic type specifier with type variables against actual type specifiers

Author

Masataro Asai

Contact

License

LLGPL

Version

0.1

Dependencies
  • alexandria (system).
  • trivia (system).
  • introspect-environment (system).
  • type-r (system).
Source

trivialib.type-unify.asd.

Child Component

src (module).


3 Modules

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


3.1 trivialib.type-unify/src

Source

trivialib.type-unify.asd.

Parent Component

trivialib.type-unify (system).

Child Component

package.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 trivialib.type-unify/trivialib.type-unify.asd

Source

trivialib.type-unify.asd.

Parent Component

trivialib.type-unify (system).

ASDF Systems

trivialib.type-unify.


4.1.2 trivialib.type-unify/src/package.lisp

Source

trivialib.type-unify.asd.

Parent Component

src (module).

Packages

trivialib.type-unify.

Public Interface
Internals

5 Packages

Packages are listed by definition order.


5.1 trivialib.type-unify

Source

package.lisp.

Use List
  • alexandria.
  • common-lisp.
  • trivia.fail.
  • trivia.level2.
  • type-r.
Public Interface
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: type-unify (typevars templates types)

Unify the type templates against types.
TYPES is a list of type specifiers.
TYPEVARS is a list of symbols.
TEMPLATES is a list of type specifiers, but may also contain
the elements of TYPEVARS somewhere in the tree.

TYPE-UNIFY assumes that the unification is the conjunction of each pair of a template and a type.
If some pair fails to unify, then the whole pairs fail to unify.
Also, if some unification (assignment to type variable) in a given pair
contradicts the other assignment, then the whole pairs fail to unify.

Returns (values result unify-p), where the result is an alist containing the assignment of unification and unify-p is a boolean indicating if the given template unifies against the given types.

Package

trivialib.type-unify.

Source

package.lisp.

Function: type-unify1 (typevars template type)

Unify the type template against a type.
TYPE is a type specifiers.
TYPEVARS is a list of symbols.
TEMPLATE is a type specifiers, but may contain the elements of TYPEVARS somewhere in the tree.

Returns (values result unify-p), where the result is an alist containing the assignment of unification and unify-p is a boolean indicating if the given template unifies against the given types.

Package

trivialib.type-unify.

Source

package.lisp.


6.2 Internals


6.2.1 Ordinary functions

Function: %unify-numeroid (typevars template type)
Package

trivialib.type-unify.

Source

package.lisp.

Function: merge-dimensions (&optional a b)
Package

trivialib.type-unify.

Source

package.lisp.

Function: merge-mappings-as-and (mapping1 mapping2)
Package

trivialib.type-unify.

Source

package.lisp.

Function: merge-mappings-as-or (mapping1 mapping2)
Package

trivialib.type-unify.

Source

package.lisp.

Function: remove-larger (sequence partial-order<)
Package

trivialib.type-unify.

Source

package.lisp.

Function: remove-smaller (sequence partial-order<)
Package

trivialib.type-unify.

Source

package.lisp.

Function: strict-subtypep-or-indifferent (a b)
Package

trivialib.type-unify.

Source

package.lisp.

Function: unify-arrayoid (typevars template type)
Package

trivialib.type-unify.

Source

package.lisp.

Function: unify-dimensions (typevars dimensions1 dimensions2)
Package

trivialib.type-unify.

Source

package.lisp.

Function: unify-numeroid (typevars template type)
Package

trivialib.type-unify.

Source

package.lisp.


Appendix A Indexes


A.1 Concepts


A.3 Variables