spectra_abstract_code (spectra v0.13.1)

View Source

Summary

Functions

Applies all structural transforms stored in a type-ref meta map (only, field_aliases) to a resolved type. Call after resolving a #sp_user_type_ref{}, #sp_remote_type{}, or #sp_rec_ref{} to honour transforms declared at the alias site.

Functions

apply_field_aliases/2

-spec apply_field_aliases(spectra:sp_type(), #{atom() | integer() => binary()}) -> spectra:sp_type().

apply_only/2

-spec apply_only(spectra:sp_type(), [atom()]) -> spectra:sp_type().

apply_ref_meta(Type, Meta)

-spec apply_ref_meta(spectra:sp_type(), spectra:sp_type_meta()) -> spectra:sp_type().

Applies all structural transforms stored in a type-ref meta map (only, field_aliases) to a resolved type. Call after resolving a #sp_user_type_ref{}, #sp_remote_type{}, or #sp_rec_ref{} to honour transforms declared at the alias site.

types_in_forms(Module, Forms)

-spec types_in_forms(module(), [erl_parse:abstract_form() | erl_parse:form_info()]) ->
                        spectra:type_info().

types_in_module(Module)

-spec types_in_module(atom()) -> spectra:type_info().

types_in_module_path(FilePath)

-spec types_in_module_path(file:filename()) -> spectra:type_info().