Make mkDFunUnfolding more robust
authorsimonpj@microsoft.com <unknown>
Wed, 22 Dec 2010 13:08:54 +0000 (13:08 +0000)
committersimonpj@microsoft.com <unknown>
Wed, 22 Dec 2010 13:08:54 +0000 (13:08 +0000)
commit3e0a7b9fbc16e432efa562df027d189fa274943a
tree6ffbb5ee0959d7cdcc7eb3f310313bafa5f15a4c
parentdb0c13a482893243cc829bbc253862e65f437cbe
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.
compiler/coreSyn/CoreUnfold.lhs
compiler/iface/MkIface.lhs
compiler/iface/TcIface.lhs
compiler/typecheck/TcInstDcls.lhs
compiler/typecheck/TcType.lhs
compiler/types/InstEnv.lhs