carry along type definitions as intermediate results