From: lewie Date: Fri, 9 Jun 2000 23:28:34 +0000 (+0000) Subject: [project @ 2000-06-09 23:28:34 by lewie] X-Git-Tag: Approximately_9120_patches~4291 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=d76863bb7fbb933695b39b06da92246676506f16;p=ghc-hetmet.git [project @ 2000-06-09 23:28:34 by lewie] Simon was kind enough to re-write elegantly a function that I had written awkwardly, but revealed that beautification doesn't always yield better code ;-) Fixed a silly typo and further beautified the code (so that the cut-n-paster error that Simon introduced would have been easier to spot). --- diff --git a/ghc/compiler/types/FunDeps.lhs b/ghc/compiler/types/FunDeps.lhs index 686d98d..108fb1c 100644 --- a/ghc/compiler/types/FunDeps.lhs +++ b/ghc/compiler/types/FunDeps.lhs @@ -79,7 +79,8 @@ lookupInstTy tyvars ts u = ts !! i tyVarFunDep :: [FunDep Type] -> [FunDep TyVar] tyVarFunDep fdtys - = [(varSetElems (tyVarsOfTypes xs), varSetElems (tyVarsOfTypes xs)) | (xs,ys) <- fdtys] + = [(getTyvars xs, getTyvars ys) | (xs, ys) <- fdtys] + where getTyvars = varSetElems . tyVarsOfTypes pprFundeps :: Outputable a => [FunDep a] -> SDoc pprFundeps [] = empty