The type-r Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The type-r Reference Manual

This is the type-r Reference Manual, version 0.1, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 04:42:21 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

* Type-R

[[https://travis-ci.org/guicho271828/type-r][https://travis-ci.org/guicho271828/type-r.svg?branch=master]]

This library provides a parser interface for the built-in compound types
defined in Common Lisp.

Consider when we have an unknown type specifier. It is easy to determine if
this type is a subtype of =string= --- just use =subtypep=. Ok, so, is it
also easy to parse the declared length of this string?

Not quite trivial as expected. This is because CL allows a bunch of
alternative representations for a =string= subtypes. We have to consider
all of =(simple-base-string 50)= , =(string)= or =string=. This is the
target of this library.

This was initially a re-implementation of
Bike/compiler-macro/type-utils.lisp . While it maintains the accessor for each
type manually with lots of /cond/ and /case/ statements, I 
automated the definition of accessors with macros and pattern matcher
[[https://github.com/guicho271828/trivia][Trivia]], and provide more complete API for Common Lisp.

Types covered by this library are shown in the table below: which means,
every compound types in CL.
For the complete list of accessors, see [[http://quickdocs.org/type-r/api][quickdocs reference]].

c.f. http://www.lispworks.com/documentation/HyperSpec/Body/04_bc.htm

|              |              |                    |
|--------------+--------------+--------------------|
| and          | long-float   | simple-base-string |
| array        | member       | simple-bit-vector  |
| base-string  | mod          | simple-string      |
| bit-vector   | not          | simple-vector      |
| complex      | or           | single-float       |
| cons         | rational     | string             |
| double-float | real         | unsigned-byte      |
| eql          | satisfies    | values             |
| float        | short-float  | vector             |
| function     | signed-byte  | bit                |
| integer      | simple-array |                    |
|--------------+--------------+--------------------|

** Type Accessors

We have several accessor functions which returns the corresponding metadata
of a given type specifier.
The name of a function that obtains the /Y/ portion of a given type
/X/ is named /X-type-Y/, e.g., for /size/ portion of /string/,
we have /string-type-size/.

#+BEGIN_SRC lisp
(string-type-size '(string 50)) ; --> 50
(string-type-size '(string))    ; --> '*
(string-type-size 'string)      ; --> '*
(string-type-size 'base-string) ; |- error
(string-type-size '(base-string 50)) ; |- error
#+END_SRC

At this moment, the subtype relationship is not considered. For example,
/string-type-size/ does not match /base-string/. We have
/string-subtype-size/ and similar variants that matches all such
subtypes.

#+BEGIN_SRC lisp
(string-subtype-size '(string 50)) ; --> 50
(string-subtype-size '(string))    ; --> '*
(string-subtype-size 'string)      ; --> '*
(string-subtype-size 'base-string) ; --> '*
(string-subtype-size '(base-string 50)) ; --> 50
#+END_SRC

*List of general pattern names related to arrays*

+ base-string-subtype
+ string-subtype
+ bitvector-subtype
+ vector-subtype
+ simple-array-subtype
+ array-subtype

For type specifiers that are "/Compound Type Specifier Kind: Specializing./" or
"/Compound Type Specifier Kind: Abbreviating./" in CLHS, there may be more
metadata that do not explicitly appear in the type specifier but is still useful. For
example, =string= implies that [[http://www.lispworks.com/documentation/lw51/CLHS/Body/t_string.htm][it is an array of =character= subtypes]] .

Given that array's element-type is accessible through
=array-type-element-type=, we also provide =string-type-element-type= and
so on.

#+BEGIN_SRC lisp
(array-type-element-type 'array)               ; --> '*
(array-type-element-type '(array * 20))        ; --> '*
(array-type-element-type '(array character *)) ; --> 'character
(string-type-element-type 'string)             ; --> 'character
(array-subtype-element-type 'string)           ; --> 'character
(array-type-element-type 'string)              ; |- error (use *-subtype-* instead)
#+END_SRC

** Number types

*List of general pattern names related to numbers*

+ byte-subtype
+ integer-subtype
+ float-subtype
+ real-subtype
+ float-subtype

Number type /X/ have the corresponding functions /X/-low and /X/-high which
shows the lower and the upper bound.

=MOD= type is a subtype of integers, so it is also supported.
Same for =BIT= type.

** Other types

We also support =function=, =values=, =member=, =or=, =and=, =cons=, =member=, =eql=.

+ =function= has =function-type-return-type= / =function-type-args-type= accessors.
+ =member= has =member-type-members-=.
+ =or= / =and= has =or/and-type-types=.
+ =cons= has =cons-type-car/cdr-type=.
+ =eql= has =eql-type-object=.

** Pattern Matcher Integration

Type-R is implemented with a pattern matcher Trivia. This allows further
integration of type specifiers with pattern matchers.

For a given type specifier /X/, there is a Trivia pattern /X-type/, e.g., for /string/, we
have a pattern named /string-type/ .

#+BEGIN_SRC lisp
(match '(string 50)
  ((string-type size) size)) ; --> 50

(match '(string)
  ((string-type size) size)) ; --> '*

(match 'string
  ((string-type size) size)) ; --> '*
#+END_SRC

#+BEGIN_SRC lisp
(ematch '(simple-array * 3)
  ((array-type _ rank) rank)) ; --> match error!

(ematch '(simple-array * 3)
  ((array-subtype _ rank) rank)) ; --> 3

(ematch '(simple-array * (3 2))
  ((array-subtype _ (list _ column)) column)) ; --> 2
#+END_SRC

#+BEGIN_SRC lisp
(ematch '(simple-string 5)
  ((simple-string-type size) size)) ; --> 5

(ematch '(simple-string 5)
  ((simple-string-type _ type) type)) ; --> 'character

(ematch '(base-string 5)
  ((base-string-type _ type) type)) ; --> 'base-char
#+END_SRC

For number types, we have patterns like /(float-type low high)/. Similarly
to the array types, we have optional values that are bounded by default,
e.g.,

#+BEGIN_SRC lisp

(match 'fixnum
  ((integer-subtype low _) low)) ; --> [MOST-NEGATIVE-FIXNUM] (implementation dependent)

#+END_SRC


# ** Predicates
# 
# These are fundamentally not different from =cl:subtypep=.
# 
# We have several predicates which returns true when a given type exactly matches
# the expected type.
# These predicates are named according to the standard convention:
# /X-type-p/ for a type /X/.
# 
# #+BEGIN_SRC lisp
# (string-type-p '(string 50)) ; --> t
# (string-type-p '(string))    ; --> t
# (string-type-p 'string)      ; --> t
# (string-type-p 'base-string)      ; --> nil
# #+END_SRC
# 
# As you see, the subtype relationship is not considered. For example,
# /string-type-p/ does not match /base-string/. Instead, the library has
# /string-subtype-p/ and similar variants that matches all such
# type specifiers.


** Dependencies

This library is at least tested on implementation listed below:

+ SBCL 1.2.8 on X86-64 Linux  3.13.0-46-generic (author's environment)

Also, it depends on the following libraries:

+ Trivia by Masataro Asai ::
     NON-Optimized Pattern Matching Library

+ alexandria by  ::
    Alexandria is a collection of portable public domain utilities.

+ iterate by  ::
    Jonathan Amsterdam's iterator/gatherer/accumulator facility

** Author

+ Masataro Asai (guicho2.71828@gmail.com)

* Copyright

Copyright (c) 2015 Masataro Asai (guicho2.71828@gmail.com)


* License

Licensed under the LLGPL License.





Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

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


Previous: , Up: Systems   [Contents][Index]

2.1 type-r

Author

Masataro Asai

Contact

guicho2.71828@gmail.com

License

LLGPL

Description

Collections of accessor functions and patterns to access the elements in compound type specifier, e.g. ‘dimensions’ in ‘(array element-type dimensions)’

Version

0.1

Dependencies
Source

type-r.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

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


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 type-r.asd

Location

/home/quickbuilder/quicklisp/dists/quicklisp/software/type-r-20180228-git/type-r.asd

Systems

type-r (system)

Packages

type-r-asd


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 type-r/package.lisp

Parent

type-r (system)

Location

package.lisp

Packages

type-r


Previous: , Up: Lisp files   [Contents][Index]

3.1.3 type-r/patterns.lisp

Dependency

package.lisp (file)

Parent

type-r (system)

Location

patterns.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

4.1 type-r-asd

Source

/home/quickbuilder/quicklisp/dists/quicklisp/software/type-r-20180228-git/type-r.asd

Use List

Previous: , Up: Packages   [Contents][Index]

4.2 type-r

Source

package.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

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


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Macros

Macro: and-type &optional TYPES
Package

type-r

Source

patterns.lisp (file)

Macro: array-subtype &optional ELEMENT-TYPE DIMENSIONS
Package

type-r

Source

patterns.lisp (file)

Macro: array-type &optional ELEMENT-TYPE DIMENSIONS
Package

type-r

Source

patterns.lisp (file)

Macro: base-string-subtype &optional SIZE ELEMENT-TYPE
Package

type-r

Source

patterns.lisp (file)

Macro: base-string-type &optional SIZE ELEMENT-TYPE
Package

type-r

Source

patterns.lisp (file)

Macro: bignum-type &optional LOW HIGH
Package

type-r

Source

patterns.lisp (file)

Macro: bit-type &optional LOW HIGH
Package

type-r

Source

patterns.lisp (file)

Macro: bit-vector-type &optional SIZE ELEMENT-TYPE
Package

type-r

Source

patterns.lisp (file)

Macro: bitvector-subtype &optional SIZE ELEMENT-TYPE
Package

type-r

Source

patterns.lisp (file)

Macro: byte-subtype &optional LOW HIGH
Package

type-r

Source

patterns.lisp (file)

Macro: complex-type &optional ELEMENT-TYPE
Package

type-r

Source

patterns.lisp (file)

Macro: cons-type &optional CAR-TYPE CDR-TYPE
Package

type-r

Source

patterns.lisp (file)

Macro: double-float-type &optional LOW HIGH
Package

type-r

Source

patterns.lisp (file)

Macro: eql-type &optional OBJECT
Package

type-r

Source

patterns.lisp (file)

Macro: fixnum-type &optional LOW HIGH
Package

type-r

Source

patterns.lisp (file)

Macro: float-subtype &optional LOW HIGH
Package

type-r

Source

patterns.lisp (file)

Macro: float-type &optional LOW HIGH
Package

type-r

Source

patterns.lisp (file)

Macro: function-type &optional ARGS-TYPES RETURN-TYPE
Package

type-r

Source

patterns.lisp (file)

Macro: integer-subtype &optional LOW HIGH
Package

type-r

Source

patterns.lisp (file)

Macro: integer-type &optional LOW HIGH
Package

type-r

Source

patterns.lisp (file)

Macro: long-float-type &optional LOW HIGH
Package

type-r

Source

patterns.lisp (file)

Macro: member-type &optional MEMBERS
Package

type-r

Source

patterns.lisp (file)

Macro: mod-type &optional LOW HIGH
Package

type-r

Source

patterns.lisp (file)

Macro: not-type &optional TYPE
Package

type-r

Source

patterns.lisp (file)

Macro: or-type &optional TYPES
Package

type-r

Source

patterns.lisp (file)

Macro: ratio-type &optional LOW HIGH
Package

type-r

Source

patterns.lisp (file)

Macro: rational-subtype &optional LOW HIGH
Package

type-r

Source

patterns.lisp (file)

Macro: rational-type &optional LOW HIGH
Package

type-r

Source

patterns.lisp (file)

Macro: real-subtype &optional LOW HIGH
Package

type-r

Source

patterns.lisp (file)

Macro: real-type &optional LOW HIGH
Package

type-r

Source

patterns.lisp (file)

Macro: satisfies-type &optional FUNCTION
Package

type-r

Source

patterns.lisp (file)

Macro: short-float-type &optional LOW HIGH
Package

type-r

Source

patterns.lisp (file)

Macro: signed-byte-type &optional LOW HIGH
Package

type-r

Source

patterns.lisp (file)

Macro: simple-array-subtype &optional ELEMENT-TYPE DIMENSIONS
Package

type-r

Source

patterns.lisp (file)

Macro: simple-array-type &optional ELEMENT-TYPE DIMENSIONS
Package

type-r

Source

patterns.lisp (file)

Macro: simple-base-string-type &optional SIZE ELEMENT-TYPE
Package

type-r

Source

patterns.lisp (file)

Macro: simple-bit-vector-type &optional SIZE ELEMENT-TYPE
Package

type-r

Source

patterns.lisp (file)

Macro: simple-string-type &optional SIZE ELEMENT-TYPE
Package

type-r

Source

patterns.lisp (file)

Macro: simple-vector-type &optional SIZE ELEMENT-TYPE
Package

type-r

Source

patterns.lisp (file)

Macro: single-float-type &optional LOW HIGH
Package

type-r

Source

patterns.lisp (file)

Macro: string-subtype &optional SIZE ELEMENT-TYPE
Package

type-r

Source

patterns.lisp (file)

Macro: string-type &optional SIZE ELEMENT-TYPE
Package

type-r

Source

patterns.lisp (file)

Macro: unsigned-byte-type &optional LOW HIGH
Package

type-r

Source

patterns.lisp (file)

Macro: values-type &optional PRIMARY
Package

type-r

Source

patterns.lisp (file)

Macro: vector-subtype &optional SIZE ELEMENT-TYPE
Package

type-r

Source

patterns.lisp (file)

Macro: vector-type &optional SIZE ELEMENT-TYPE
Package

type-r

Source

patterns.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Functions

Function: and-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: and-type-types OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: array-subtype-dimensions OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: array-subtype-element-type OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: array-subtype-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: array-type-dimensions OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: array-type-element-type OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: array-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: base-string-subtype-element-type OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: base-string-subtype-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: base-string-subtype-size OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: base-string-type-element-type OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: base-string-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: base-string-type-size OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: bignum-type-high OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: bignum-type-low OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: bignum-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: bit-type-high OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: bit-type-low OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: bit-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: bit-vector-type-element-type OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: bit-vector-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: bit-vector-type-size OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: bitvector-subtype-element-type OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: bitvector-subtype-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: bitvector-subtype-size OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: byte-subtype-high OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: byte-subtype-low OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: byte-subtype-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: complex-type-element-type OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: complex-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: cons-type-car-type OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: cons-type-cdr-type OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: cons-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: double-float-type-high OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: double-float-type-low OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: double-float-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: eql-type-object OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: eql-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: fixnum-type-high OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: fixnum-type-low OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: fixnum-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: float-subtype-high OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: float-subtype-low OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: float-subtype-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: float-type-high OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: float-type-low OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: float-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: function-type-args-types OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: function-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: function-type-return-type OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: integer-subtype-high OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: integer-subtype-low OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: integer-subtype-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: integer-type-high OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: integer-type-low OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: integer-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: long-float-type-high OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: long-float-type-low OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: long-float-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: member-type-members OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: member-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: mod-type-high OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: mod-type-low OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: mod-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: not-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: not-type-type OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: or-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: or-type-types OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: ratio-type-high OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: ratio-type-low OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: ratio-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: rational-subtype-high OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: rational-subtype-low OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: rational-subtype-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: rational-type-high OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: rational-type-low OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: rational-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: real-subtype-high OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: real-subtype-low OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: real-subtype-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: real-type-high OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: real-type-low OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: real-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: satisfies-type-function OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: satisfies-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: short-float-type-high OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: short-float-type-low OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: short-float-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: signed-byte-type-high OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: signed-byte-type-low OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: signed-byte-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: simple-array-subtype-dimensions OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: simple-array-subtype-element-type OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: simple-array-subtype-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: simple-array-type-dimensions OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: simple-array-type-element-type OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: simple-array-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: simple-base-string-type-element-type OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: simple-base-string-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: simple-base-string-type-size OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: simple-bit-vector-type-element-type OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: simple-bit-vector-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: simple-bit-vector-type-size OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: simple-string-type-element-type OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: simple-string-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: simple-string-type-size OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: simple-vector-type-element-type OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: simple-vector-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: simple-vector-type-size OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: single-float-type-high OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: single-float-type-low OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: single-float-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: string-subtype-element-type OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: string-subtype-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: string-subtype-size OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: string-type-element-type OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: string-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: string-type-size OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: unsigned-byte-type-high OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: unsigned-byte-type-low OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: unsigned-byte-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: values-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: values-type-primary OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: vector-subtype-element-type OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: vector-subtype-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: vector-subtype-size OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: vector-type-element-type OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: vector-type-p OBJ0
Package

type-r

Source

patterns.lisp (file)

Function: vector-type-size OBJ0
Package

type-r

Source

patterns.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Macros

Macro: defpattern-with-accessors NAME ARGS &body BODY

defpattern-with-accessor macro provides:
1. it is a simple wrapper around trivia:defpattern.
2. it defines accessors like function-type-return-type automatically, based on the names of the arguments.
3. it defines predicates like function-type-p automatically.
4. using these predicates, implementation of form-typep can be simplified.

several assumptions: only &rest keywords can be recognized.

Package

type-r

Source

patterns.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Functions

Function: make-atomic-type-matcher NAME ARGLIST
Package

type-r

Source

patterns.lisp (file)

Function: make-binder PAIR
Package

type-r

Source

patterns.lisp (file)

Function: make-compound-type-matcher NAME SPECIFIED UNSPECIFIED
Package

type-r

Source

patterns.lisp (file)

Function: make-types-matcher NAME ARGLIST &optional FIXED

Generates a matcher for variations of compound types, e.g.
vector, (vector), (vector ’fixnum), (vector ’fixnum 2).

name : the symbol denoting the atomic type specifier e.g. vector
arglist : (variable default)* — follows the syntax of &optional arguments of types.
fixed : (variable default)* — specifies the types that can be inferred from the array type.

Package

type-r

Source

patterns.lisp (file)

Function: wildcards-but-nth LENGTH N SYM
Package

type-r

Source

patterns.lisp (file)

Function: wrap-wildcards ARGS
Package

type-r

Source

patterns.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   T  
Index Entry  Section

F
File, Lisp, type-r.asd: The type-r<dot>asd file
File, Lisp, type-r/package.lisp: The type-r/package<dot>lisp file
File, Lisp, type-r/patterns.lisp: The type-r/patterns<dot>lisp file

L
Lisp File, type-r.asd: The type-r<dot>asd file
Lisp File, type-r/package.lisp: The type-r/package<dot>lisp file
Lisp File, type-r/patterns.lisp: The type-r/patterns<dot>lisp file

T
type-r.asd: The type-r<dot>asd file
type-r/package.lisp: The type-r/package<dot>lisp file
type-r/patterns.lisp: The type-r/patterns<dot>lisp file

Jump to:   F   L   T  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   A   B   C   D   E   F   I   L   M   N   O   R   S   U   V   W  
Index Entry  Section

A
and-type: Exported macros
and-type-p: Exported functions
and-type-types: Exported functions
array-subtype: Exported macros
array-subtype-dimensions: Exported functions
array-subtype-element-type: Exported functions
array-subtype-p: Exported functions
array-type: Exported macros
array-type-dimensions: Exported functions
array-type-element-type: Exported functions
array-type-p: Exported functions

B
base-string-subtype: Exported macros
base-string-subtype-element-type: Exported functions
base-string-subtype-p: Exported functions
base-string-subtype-size: Exported functions
base-string-type: Exported macros
base-string-type-element-type: Exported functions
base-string-type-p: Exported functions
base-string-type-size: Exported functions
bignum-type: Exported macros
bignum-type-high: Exported functions
bignum-type-low: Exported functions
bignum-type-p: Exported functions
bit-type: Exported macros
bit-type-high: Exported functions
bit-type-low: Exported functions
bit-type-p: Exported functions
bit-vector-type: Exported macros
bit-vector-type-element-type: Exported functions
bit-vector-type-p: Exported functions
bit-vector-type-size: Exported functions
bitvector-subtype: Exported macros
bitvector-subtype-element-type: Exported functions
bitvector-subtype-p: Exported functions
bitvector-subtype-size: Exported functions
byte-subtype: Exported macros
byte-subtype-high: Exported functions
byte-subtype-low: Exported functions
byte-subtype-p: Exported functions

C
complex-type: Exported macros
complex-type-element-type: Exported functions
complex-type-p: Exported functions
cons-type: Exported macros
cons-type-car-type: Exported functions
cons-type-cdr-type: Exported functions
cons-type-p: Exported functions

D
defpattern-with-accessors: Internal macros
double-float-type: Exported macros
double-float-type-high: Exported functions
double-float-type-low: Exported functions
double-float-type-p: Exported functions

E
eql-type: Exported macros
eql-type-object: Exported functions
eql-type-p: Exported functions

F
fixnum-type: Exported macros
fixnum-type-high: Exported functions
fixnum-type-low: Exported functions
fixnum-type-p: Exported functions
float-subtype: Exported macros
float-subtype-high: Exported functions
float-subtype-low: Exported functions
float-subtype-p: Exported functions
float-type: Exported macros
float-type-high: Exported functions
float-type-low: Exported functions
float-type-p: Exported functions
Function, and-type-p: Exported functions
Function, and-type-types: Exported functions
Function, array-subtype-dimensions: Exported functions
Function, array-subtype-element-type: Exported functions
Function, array-subtype-p: Exported functions
Function, array-type-dimensions: Exported functions
Function, array-type-element-type: Exported functions
Function, array-type-p: Exported functions
Function, base-string-subtype-element-type: Exported functions
Function, base-string-subtype-p: Exported functions
Function, base-string-subtype-size: Exported functions
Function, base-string-type-element-type: Exported functions
Function, base-string-type-p: Exported functions
Function, base-string-type-size: Exported functions
Function, bignum-type-high: Exported functions
Function, bignum-type-low: Exported functions
Function, bignum-type-p: Exported functions
Function, bit-type-high: Exported functions
Function, bit-type-low: Exported functions
Function, bit-type-p: Exported functions
Function, bit-vector-type-element-type: Exported functions
Function, bit-vector-type-p: Exported functions
Function, bit-vector-type-size: Exported functions
Function, bitvector-subtype-element-type: Exported functions
Function, bitvector-subtype-p: Exported functions
Function, bitvector-subtype-size: Exported functions
Function, byte-subtype-high: Exported functions
Function, byte-subtype-low: Exported functions
Function, byte-subtype-p: Exported functions
Function, complex-type-element-type: Exported functions
Function, complex-type-p: Exported functions
Function, cons-type-car-type: Exported functions
Function, cons-type-cdr-type: Exported functions
Function, cons-type-p: Exported functions
Function, double-float-type-high: Exported functions
Function, double-float-type-low: Exported functions
Function, double-float-type-p: Exported functions
Function, eql-type-object: Exported functions
Function, eql-type-p: Exported functions
Function, fixnum-type-high: Exported functions
Function, fixnum-type-low: Exported functions
Function, fixnum-type-p: Exported functions
Function, float-subtype-high: Exported functions
Function, float-subtype-low: Exported functions
Function, float-subtype-p: Exported functions
Function, float-type-high: Exported functions
Function, float-type-low: Exported functions
Function, float-type-p: Exported functions
Function, function-type-args-types: Exported functions
Function, function-type-p: Exported functions
Function, function-type-return-type: Exported functions
Function, integer-subtype-high: Exported functions
Function, integer-subtype-low: Exported functions
Function, integer-subtype-p: Exported functions
Function, integer-type-high: Exported functions
Function, integer-type-low: Exported functions
Function, integer-type-p: Exported functions
Function, long-float-type-high: Exported functions
Function, long-float-type-low: Exported functions
Function, long-float-type-p: Exported functions
Function, make-atomic-type-matcher: Internal functions
Function, make-binder: Internal functions
Function, make-compound-type-matcher: Internal functions
Function, make-types-matcher: Internal functions
Function, member-type-members: Exported functions
Function, member-type-p: Exported functions
Function, mod-type-high: Exported functions
Function, mod-type-low: Exported functions
Function, mod-type-p: Exported functions
Function, not-type-p: Exported functions
Function, not-type-type: Exported functions
Function, or-type-p: Exported functions
Function, or-type-types: Exported functions
Function, ratio-type-high: Exported functions
Function, ratio-type-low: Exported functions
Function, ratio-type-p: Exported functions
Function, rational-subtype-high: Exported functions
Function, rational-subtype-low: Exported functions
Function, rational-subtype-p: Exported functions
Function, rational-type-high: Exported functions
Function, rational-type-low: Exported functions
Function, rational-type-p: Exported functions
Function, real-subtype-high: Exported functions
Function, real-subtype-low: Exported functions
Function, real-subtype-p: Exported functions
Function, real-type-high: Exported functions
Function, real-type-low: Exported functions
Function, real-type-p: Exported functions
Function, satisfies-type-function: Exported functions
Function, satisfies-type-p: Exported functions
Function, short-float-type-high: Exported functions
Function, short-float-type-low: Exported functions
Function, short-float-type-p: Exported functions
Function, signed-byte-type-high: Exported functions
Function, signed-byte-type-low: Exported functions
Function, signed-byte-type-p: Exported functions
Function, simple-array-subtype-dimensions: Exported functions
Function, simple-array-subtype-element-type: Exported functions
Function, simple-array-subtype-p: Exported functions
Function, simple-array-type-dimensions: Exported functions
Function, simple-array-type-element-type: Exported functions
Function, simple-array-type-p: Exported functions
Function, simple-base-string-type-element-type: Exported functions
Function, simple-base-string-type-p: Exported functions
Function, simple-base-string-type-size: Exported functions
Function, simple-bit-vector-type-element-type: Exported functions
Function, simple-bit-vector-type-p: Exported functions
Function, simple-bit-vector-type-size: Exported functions
Function, simple-string-type-element-type: Exported functions
Function, simple-string-type-p: Exported functions
Function, simple-string-type-size: Exported functions
Function, simple-vector-type-element-type: Exported functions
Function, simple-vector-type-p: Exported functions
Function, simple-vector-type-size: Exported functions
Function, single-float-type-high: Exported functions
Function, single-float-type-low: Exported functions
Function, single-float-type-p: Exported functions
Function, string-subtype-element-type: Exported functions
Function, string-subtype-p: Exported functions
Function, string-subtype-size: Exported functions
Function, string-type-element-type: Exported functions
Function, string-type-p: Exported functions
Function, string-type-size: Exported functions
Function, unsigned-byte-type-high: Exported functions
Function, unsigned-byte-type-low: Exported functions
Function, unsigned-byte-type-p: Exported functions
Function, values-type-p: Exported functions
Function, values-type-primary: Exported functions
Function, vector-subtype-element-type: Exported functions
Function, vector-subtype-p: Exported functions
Function, vector-subtype-size: Exported functions
Function, vector-type-element-type: Exported functions
Function, vector-type-p: Exported functions
Function, vector-type-size: Exported functions
Function, wildcards-but-nth: Internal functions
Function, wrap-wildcards: Internal functions
function-type: Exported macros
function-type-args-types: Exported functions
function-type-p: Exported functions
function-type-return-type: Exported functions

I
integer-subtype: Exported macros
integer-subtype-high: Exported functions
integer-subtype-low: Exported functions
integer-subtype-p: Exported functions
integer-type: Exported macros
integer-type-high: Exported functions
integer-type-low: Exported functions
integer-type-p: Exported functions

L
long-float-type: Exported macros
long-float-type-high: Exported functions
long-float-type-low: Exported functions
long-float-type-p: Exported functions

M
Macro, and-type: Exported macros
Macro, array-subtype: Exported macros
Macro, array-type: Exported macros
Macro, base-string-subtype: Exported macros
Macro, base-string-type: Exported macros
Macro, bignum-type: Exported macros
Macro, bit-type: Exported macros
Macro, bit-vector-type: Exported macros
Macro, bitvector-subtype: Exported macros
Macro, byte-subtype: Exported macros
Macro, complex-type: Exported macros
Macro, cons-type: Exported macros
Macro, defpattern-with-accessors: Internal macros
Macro, double-float-type: Exported macros
Macro, eql-type: Exported macros
Macro, fixnum-type: Exported macros
Macro, float-subtype: Exported macros
Macro, float-type: Exported macros
Macro, function-type: Exported macros
Macro, integer-subtype: Exported macros
Macro, integer-type: Exported macros
Macro, long-float-type: Exported macros
Macro, member-type: Exported macros
Macro, mod-type: Exported macros
Macro, not-type: Exported macros
Macro, or-type: Exported macros
Macro, ratio-type: Exported macros
Macro, rational-subtype: Exported macros
Macro, rational-type: Exported macros
Macro, real-subtype: Exported macros
Macro, real-type: Exported macros
Macro, satisfies-type: Exported macros
Macro, short-float-type: Exported macros
Macro, signed-byte-type: Exported macros
Macro, simple-array-subtype: Exported macros
Macro, simple-array-type: Exported macros
Macro, simple-base-string-type: Exported macros
Macro, simple-bit-vector-type: Exported macros
Macro, simple-string-type: Exported macros
Macro, simple-vector-type: Exported macros
Macro, single-float-type: Exported macros
Macro, string-subtype: Exported macros
Macro, string-type: Exported macros
Macro, unsigned-byte-type: Exported macros
Macro, values-type: Exported macros
Macro, vector-subtype: Exported macros
Macro, vector-type: Exported macros
make-atomic-type-matcher: Internal functions
make-binder: Internal functions
make-compound-type-matcher: Internal functions
make-types-matcher: Internal functions
member-type: Exported macros
member-type-members: Exported functions
member-type-p: Exported functions
mod-type: Exported macros
mod-type-high: Exported functions
mod-type-low: Exported functions
mod-type-p: Exported functions

N
not-type: Exported macros
not-type-p: Exported functions
not-type-type: Exported functions

O
or-type: Exported macros
or-type-p: Exported functions
or-type-types: Exported functions

R
ratio-type: Exported macros
ratio-type-high: Exported functions
ratio-type-low: Exported functions
ratio-type-p: Exported functions
rational-subtype: Exported macros
rational-subtype-high: Exported functions
rational-subtype-low: Exported functions
rational-subtype-p: Exported functions
rational-type: Exported macros
rational-type-high: Exported functions
rational-type-low: Exported functions
rational-type-p: Exported functions
real-subtype: Exported macros
real-subtype-high: Exported functions
real-subtype-low: Exported functions
real-subtype-p: Exported functions
real-type: Exported macros
real-type-high: Exported functions
real-type-low: Exported functions
real-type-p: Exported functions

S
satisfies-type: Exported macros
satisfies-type-function: Exported functions
satisfies-type-p: Exported functions
short-float-type: Exported macros
short-float-type-high: Exported functions
short-float-type-low: Exported functions
short-float-type-p: Exported functions
signed-byte-type: Exported macros
signed-byte-type-high: Exported functions
signed-byte-type-low: Exported functions
signed-byte-type-p: Exported functions
simple-array-subtype: Exported macros
simple-array-subtype-dimensions: Exported functions
simple-array-subtype-element-type: Exported functions
simple-array-subtype-p: Exported functions
simple-array-type: Exported macros
simple-array-type-dimensions: Exported functions
simple-array-type-element-type: Exported functions
simple-array-type-p: Exported functions
simple-base-string-type: Exported macros
simple-base-string-type-element-type: Exported functions
simple-base-string-type-p: Exported functions
simple-base-string-type-size: Exported functions
simple-bit-vector-type: Exported macros
simple-bit-vector-type-element-type: Exported functions
simple-bit-vector-type-p: Exported functions
simple-bit-vector-type-size: Exported functions
simple-string-type: Exported macros
simple-string-type-element-type: Exported functions
simple-string-type-p: Exported functions
simple-string-type-size: Exported functions
simple-vector-type: Exported macros
simple-vector-type-element-type: Exported functions
simple-vector-type-p: Exported functions
simple-vector-type-size: Exported functions
single-float-type: Exported macros
single-float-type-high: Exported functions
single-float-type-low: Exported functions
single-float-type-p: Exported functions
string-subtype: Exported macros
string-subtype-element-type: Exported functions
string-subtype-p: Exported functions
string-subtype-size: Exported functions
string-type: Exported macros
string-type-element-type: Exported functions
string-type-p: Exported functions
string-type-size: Exported functions

U
unsigned-byte-type: Exported macros
unsigned-byte-type-high: Exported functions
unsigned-byte-type-low: Exported functions
unsigned-byte-type-p: Exported functions

V
values-type: Exported macros
values-type-p: Exported functions
values-type-primary: Exported functions
vector-subtype: Exported macros
vector-subtype-element-type: Exported functions
vector-subtype-p: Exported functions
vector-subtype-size: Exported functions
vector-type: Exported macros
vector-type-element-type: Exported functions
vector-type-p: Exported functions
vector-type-size: Exported functions

W
wildcards-but-nth: Internal functions
wrap-wildcards: Internal functions

Jump to:   A   B   C   D   E   F   I   L   M   N   O   R   S   U   V   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables


Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   P   S   T  
Index Entry  Section

P
Package, type-r: The type-r package
Package, type-r-asd: The type-r-asd package

S
System, type-r: The type-r system

T
type-r: The type-r system
type-r: The type-r package
type-r-asd: The type-r-asd package

Jump to:   P   S   T