Pass 2: resolves parsed GNU unit expressions into numeric factors and dimension maps relative to SI primitives.
Each resolved unit becomes {factor, dimensions} where dimensions
is a map of GNU primitive name to integer power. For example:
foot→{0.3048, %{"m" => 1}}newton→{1.0, %{"kg" => 1, "m" => 1, "s" => -2}}
Resolution is recursive with memoization via the process dictionary to keep stack frames small during deep chains.
Summary
Functions
Resolves all definitions in the parsed data to {factor, dimensions} pairs.
Types
@type resolved() :: {float(), dimensions()}
Functions
@spec resolve_all(Unity.GnuUnitsImporter.Parser.parsed()) :: {:ok, %{required(String.t()) => resolved()}}
Resolves all definitions in the parsed data to {factor, dimensions} pairs.