bidirectional typing for dependent tuples