I resolve call sites for GT's inline |> expander: which calls in
a source buffer point at real functions or types, resolved through
the context module's aliases, imports, and its own defs. Name-set
and alias/import lookups are md5-cached per module.
Summary
Functions
I parse Elixir source and return uniquely resolvable remote call sites.
I am true when mod defines a function (or macro-generated export)
named name. Used by GT-side C-n to decide whether an unqualified
reference should be searched in mod (true) or fall back to
cross-module implementors search (false).
I return mod's alias declarations as a list of
[short_name, full_name] pairs.
I check whether each name in names (dotted Elixir module name
strings, e.g. "GtBridge.Eval") is a currently-loaded module, and
return a %{name => boolean()} map.
I resolve an alias name using a context module's alias declarations.
Functions
I parse Elixir source and return uniquely resolvable remote call sites.
Each result has :target_module, :function, :arity, :line,
and :column. Only fully qualified and alias-resolved remote calls
are returned.
I am true when mod defines a function (or macro-generated export)
named name. Used by GT-side C-n to decide whether an unqualified
reference should be searched in mod (true) or fall back to
cross-module implementors search (false).
I return mod's alias declarations as a list of
[short_name, full_name] pairs.
GT-side wrench detection in inline function editors (the |>
expander, the Meta browser's Functions tab) shows only a function
body — the surrounding alias lines aren't visible in source, so
bare references like ColumnedList look unresolved even when the
enclosing module aliases them. The styler calls me to merge the
module's aliases into its local map before classifying.
I return a list (rather than a map) so the Smalltalk side can
iterate via asList without needing attributeAt: per name —
Maps come back as opaque proxies on the GT side.
I check whether each name in names (dotted Elixir module name
strings, e.g. "GtBridge.Eval") is a currently-loaded module, and
return a %{name => boolean()} map.
Backed by the Analysis.LoadedModules ETS-backed set, which is
populated initially from :application.get_key/2 and maintained
additively by EventBroker %ModuleEvent{} events — so each
lookup is O(1) and stays fresh without recompute.
Used by GT-side BeamModuleResolution: the styler walks source
locally with the SmaCC ElixirParser, finds module-name
candidates, batches the unknowns, and asks me once per source
change for their resolution status. After warm-up the GT cache
holds answers for every name in the user's workspace and bridge
calls go to zero.
I resolve an alias name using a context module's alias declarations.