pub fn validate_module(module: &Module) -> Result<(), String>
Validates type correctness across a module.
Checks binary operation type compatibility, assignment type safety, and type construction field correctness.