Collect ALL functions and types from a module — no visibility filtering.
Used by codegen which emits full module implementations including private helpers.
Check whether a module item is exposed to the outside.
exposes = None means the module uses the default rule (hide _-prefixed items).
exposes = Some(list) means only items in the explicit list are exposed.