Make mkDFunUnfolding more robust
It now uses tcSplitDFunTy, which is designed for the purpose and allows arbitrary argument types to the dfun, rather than tcSplitSigmaTy. This generality is used in DPH, which has internally-generated dfuns with impliciation-typed arguments. To do this I had to make tcSplitDFunTy return the number of arguments, so there are some minor knock-on effects in other modules.
Showing with 22 additions and 25 deletions