diff options
author | simonpj@microsoft.com <unknown> | 2008-12-01 16:28:45 +0000 |
---|---|---|
committer | simonpj@microsoft.com <unknown> | 2008-12-01 16:28:45 +0000 |
commit | dc667ab52ab208427094e497ece94132c57db8f2 (patch) | |
tree | 32ed17c4ebb8a18c906b812468fb3ff566dfd0a2 /compiler/types/Class.lhs | |
parent | c0ed1c0e24cbbdcba6a9918f09902f1d7a719d76 (diff) | |
download | haskell-dc667ab52ab208427094e497ece94132c57db8f2.tar.gz |
Better error message for fundep conflict
Diffstat (limited to 'compiler/types/Class.lhs')
-rw-r--r-- | compiler/types/Class.lhs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/types/Class.lhs b/compiler/types/Class.lhs index fb7cab135e..e7bda63176 100644 --- a/compiler/types/Class.lhs +++ b/compiler/types/Class.lhs @@ -10,7 +10,7 @@ module Class ( Class, ClassOpItem, DefMeth (..), - FunDep, pprFundeps, + FunDep, pprFundeps, pprFunDep, mkClass, classTyVars, classArity, classKey, className, classATs, classSelIds, classTyCon, classMethods, @@ -174,9 +174,9 @@ instance Outputable DefMeth where pprFundeps :: Outputable a => [FunDep a] -> SDoc pprFundeps [] = empty -pprFundeps fds = hsep (ptext (sLit "|") : punctuate comma (map ppr_fd fds)) - where - ppr_fd (us, vs) = hsep [interppSP us, ptext (sLit "->"), - interppSP vs] +pprFundeps fds = hsep (ptext (sLit "|") : punctuate comma (map pprFunDep fds)) + +pprFunDep :: Outputable a => FunDep a -> SDoc +pprFunDep (us, vs) = hsep [interppSP us, ptext (sLit "->"), interppSP vs] \end{code} |