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).
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