Commit ca9e79e1 authored by simonpj@microsoft.com's avatar simonpj@microsoft.com

Wibble to InstEnv.instanceHead

Fixes an accidental glitch in T1835
parent 2247d4c4
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment