Generating function type in retrieve_type.