fixed: sum/product type checking didn't work for dependent sum/product