Define a macro for constructing a TypeResolver for a given module