ExLisp.Type (exlisp v0.1.2)

Copy Markdown

ANSI Common Lisp Type System implementation for ExLisp. Supports primitive types, compound type specifiers, deftype user-defined types, typep, subtypep, and type expansion.

Summary

Functions

Registers a deftype with an AST expansion or macro-like transformer.

Ensures the ETS table for deftype is created.

Expands a type specifier if it is a user-defined deftype. Recursively expands up to max_depth.

Registers a deftype definition. lambda_list is a list of parameters, and expander_fun is a function fn args -> expanded_typespec end.

Determines if type1 is a subtype of type2. Returns [:_values_, [is_sub_bool, is_known_bool]].

Determines if val is of type type_spec.

Upgrades an array element type.

Upgrades a complex part type.

Functions

define_deftype(name, lambda_list, body_forms)

Registers a deftype with an AST expansion or macro-like transformer.

ensure_tables()

Ensures the ETS table for deftype is created.

expand_type(type_spec, depth \\ 0)

Expands a type specifier if it is a user-defined deftype. Recursively expands up to max_depth.

normalize_type_name(str)

register_deftype(name, lambda_list, expander_fun)

Registers a deftype definition. lambda_list is a list of parameters, and expander_fun is a function fn args -> expanded_typespec end.

subtypep(type1, type2)

Determines if type1 is a subtype of type2. Returns [:_values_, [is_sub_bool, is_known_bool]].

typep(val, type_spec)

Determines if val is of type type_spec.

upgraded_array_element_type(typespec, env \\ nil)

Upgrades an array element type.

upgraded_complex_part_type(typespec, env \\ nil)

Upgrades a complex part type.