X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcSplice.lhs;fp=compiler%2Ftypecheck%2FTcSplice.lhs;h=2e813146f1ffb3499df374a47690a00dc20f7668;hp=cc18707ac266bde5aca7355a3cbe6f070c6024c5;hb=2a334098a6ec81a532bbe93183c2cf6c818c0c6c;hpb=6ffbfe99284a4e9da0ff5a55ef49bc7450d1aa00 diff --git a/compiler/typecheck/TcSplice.lhs b/compiler/typecheck/TcSplice.lhs index cc18707..2e81314 100644 --- a/compiler/typecheck/TcSplice.lhs +++ b/compiler/typecheck/TcSplice.lhs @@ -941,7 +941,7 @@ illegalBracket = ptext (sLit "Template Haskell brackets cannot be nested (withou %************************************************************************ \begin{code} -lookupClassInstances :: TH.Name -> [TH.Type] -> TcM [TH.Name] +lookupClassInstances :: TH.Name -> [TH.Type] -> TcM [TH.ClassInstance] lookupClassInstances c ts = do { loc <- getSrcSpanM ; case convertToHsPred loc (TH.ClassP c ts) of { @@ -954,8 +954,7 @@ lookupClassInstances c ts -- Now look up instances ; inst_envs <- tcGetInstEnvs ; let (matches, unifies) = lookupInstEnv inst_envs cls tys - dfuns = map is_dfun (map fst matches ++ unifies) - ; return (map reifyName dfuns) } } } + ; mapM reifyClassInstance (map fst matches ++ unifies) } } } where doc = ptext (sLit "TcSplice.classInstances") \end{code}