From ca9e79e1c70a26b12ea4b63f3a1c5a804462c1a5 Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Tue, 14 Dec 2010 08:29:39 +0000 Subject: [PATCH] Wibble to InstEnv.instanceHead Fixes an accidental glitch in T1835 --- compiler/types/InstEnv.lhs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 -- 1.7.10.4