modules refactoring (4) - type resolver