fix 'many nested abstractions' in type checker