Typle.Inference
(Typle v0.3.0)
View Source
Orchestrates type inference for a module or file.
Parses the source file, expands macros in function bodies via
Typle.Inference.Expander (powered by ExPanda), then walks each
function definition through the expression inference engine.
Collects a map of {line, col} => Typle.Type.t() for every
expression in the module.
Summary
Functions
Infers types for all expressions in the given source file.
Infers types for all expressions in a compiled module.
Types
@type type_map() :: %{ required({non_neg_integer(), non_neg_integer()}) => Typle.Type.t() }
Functions
Infers types for all expressions in the given source file.
Returns a map of {line, col} => type for each expression node
that has position metadata.
Options
:unstable- whentrue, uses the compiler-replay engine fromTyple.Unstablefor deeper inference (default:false)
Infers types for all expressions in a compiled module.
Locates the source file from the module's compile info and delegates
to infer_file/1.
Options
:unstable- whentrue, uses the compiler-replay engine fromTyple.Unstablefor deeper inference (default:false)