[project @ 2000-06-09 23:28:34 by lewie]
authorlewie <unknown>
Fri, 9 Jun 2000 23:28:34 +0000 (23:28 +0000)
committerlewie <unknown>
Fri, 9 Jun 2000 23:28:34 +0000 (23:28 +0000)
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).

ghc/compiler/types/FunDeps.lhs

index 686d98d..108fb1c 100644 (file)
@@ -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