- maybe_data_type = splitAlgTyConApp_maybe ty
- Just (tycon, tycon_arg_tys, data_cons) = maybe_data_type
- (the_data_con : other_data_cons) = data_cons
- ccall_res_type = mkUnboxedTupleTy 2
- [realWorldStatePrimTy, the_prim_result_ty]
-
- data_con_arg_tys = dataConArgTys the_data_con tycon_arg_tys
- (the_prim_result_ty : other_args_tys) = data_con_arg_tys
-
+ maybe_product_type = splitProductType_maybe ty
+ Just (tycon, tycon_arg_tys, data_con, data_con_arg_tys) = maybe_product_type
+ (the_prim_result_ty : other_args_tys) = data_con_arg_tys
+ ccall_res_type = mkUnboxedTupleTy 2 [realWorldStatePrimTy, the_prim_result_ty]