From: simonpj@microsoft.com Date: Tue, 14 Dec 2010 08:29:39 +0000 (+0000) Subject: Wibble to InstEnv.instanceHead X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=ca9e79e1c70a26b12ea4b63f3a1c5a804462c1a5 Wibble to InstEnv.instanceHead Fixes an accidental glitch in T1835 --- diff --git a/compiler/types/InstEnv.lhs b/compiler/types/InstEnv.lhs index 2d6a9eb..dfbe0a0 100644 --- a/compiler/types/InstEnv.lhs +++ b/compiler/types/InstEnv.lhs @@ -166,11 +166,14 @@ pprInstances :: [Instance] -> SDoc pprInstances ispecs = vcat (map pprInstance ispecs) instanceHead :: Instance -> ([TyVar], ThetaType, Class, [Type]) -instanceHead ispec - = (tvs, theta, cls, tys) +-- Returns the *source* theta, without the silent arguments +instanceHead ispec + = (tvs, drop n_silent theta, cls, tys) where - (tvs, theta, tau) = tcSplitSigmaTy (idType (is_dfun ispec)) - (cls, tys) = tcSplitDFunHead tau + (tvs, theta, tau) = tcSplitSigmaTy (idType dfun) + (cls, tys) = tcSplitDFunHead tau + dfun = is_dfun ispec + n_silent = dfunNSilent dfun mkLocalInstance :: DFunId -> OverlapFlag