I maintain the set of every loaded Elixir module name (e.g.
"GtBridge.Eval"), populated initially from
:application.get_key/2 for every loaded application and
maintained additively by EventBroker %ModuleEvent{} events.
Consumers query me through loaded?/1 for an O(1) ETS read —
no recompute per call. Module recompiles add to my set; module
removals delete from it.
This is the FRP shape the bridge is moving toward: derived state
(the "modules currently loaded" projection) maintained by the
infrastructure (events) instead of recomputed by every consumer.
Today only Analysis.unresolved_modules/2 reads me; future
consumers (e.g. a wider styler that flags unresolved struct
literals or behaviours) plug in identically.
Public API
loaded?/1— true when the named module is in my set.
Summary
Functions
Returns a specification to start this module under a supervisor.
I am true when name (a string of the dotted Elixir module name,
e.g. "GtBridge.Eval") is currently loaded in the BEAM.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
I am true when name (a string of the dotted Elixir module name,
e.g. "GtBridge.Eval") is currently loaded in the BEAM.
@spec start_link(term()) :: GenServer.on_start()