Robustify the treatement of DFunUnfolding
authorsimonpj@microsoft.com <unknown>
Mon, 31 May 2010 14:53:32 +0000 (14:53 +0000)
committersimonpj@microsoft.com <unknown>
Mon, 31 May 2010 14:53:32 +0000 (14:53 +0000)
commita90dc3907a491bfb478262441534b24fb0eb22f4
treef9039d34eb246f0d51a2e04475806a25188408bf
parent470ff37b766d27ed4c62cf31e37c576105a19bc4
Robustify the treatement of DFunUnfolding

See Note [DFun unfoldings] in CoreSyn.  The issue here is that
you can't tell how many dictionary arguments a DFun needs just
from looking at the Arity of the DFun Id: if the dictionary is
represented by a newtype the arity might include the dictionary
and value arguments of the (single) method.

So we need to record the number of arguments need by the DFun
in the DFunUnfolding itself.  Details in
   Note [DFun unfoldings] in CoreSyn
12 files changed:
compiler/coreSyn/CoreFVs.lhs
compiler/coreSyn/CoreSubst.lhs
compiler/coreSyn/CoreSyn.lhs
compiler/coreSyn/CoreUnfold.lhs
compiler/coreSyn/PprCore.lhs
compiler/deSugar/DsBinds.lhs
compiler/iface/MkIface.lhs
compiler/iface/TcIface.lhs
compiler/main/TidyPgm.lhs
compiler/simplCore/Simplify.lhs
compiler/typecheck/TcInstDcls.lhs
compiler/vectorise/VectType.hs