diff options
author | Manuel M T Chakravarty <chak@cse.unsw.edu.au> | 2006-08-04 22:23:51 +0000 |
---|---|---|
committer | Manuel M T Chakravarty <chak@cse.unsw.edu.au> | 2006-08-04 22:23:51 +0000 |
commit | c76c69c5b62f1ca4fa52d75b0dfbd37b7eddbb09 (patch) | |
tree | ea4b3a3d47bbe3801b7bd0b04a73123eadf23ffb /compiler/types/Class.lhs | |
parent | f3c4792fad3bf46e5ee500a909287718324c45d1 (diff) | |
download | haskell-c76c69c5b62f1ca4fa52d75b0dfbd37b7eddbb09.tar.gz |
Massive patch for the first months work adding System FC to GHC #35
Broken up massive patch -=chak
Original log message:
This is (sadly) all done in one patch to avoid Darcs bugs.
It's not complete work... more FC stuff to come. A compiler
using just this patch will fail dismally.
Diffstat (limited to 'compiler/types/Class.lhs')
-rw-r--r-- | compiler/types/Class.lhs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/compiler/types/Class.lhs b/compiler/types/Class.lhs index 016ce1bfbe..fb6b901cf3 100644 --- a/compiler/types/Class.lhs +++ b/compiler/types/Class.lhs @@ -5,9 +5,11 @@ \begin{code} module Class ( - Class, ClassOpItem, FunDep, + Class, ClassOpItem, DefMeth (..), + FunDep, pprFundeps, + mkClass, classTyVars, classArity, classKey, className, classSelIds, classTyCon, classMethods, classBigSig, classExtraBigSig, classTvsFds, classSCTheta @@ -159,6 +161,12 @@ instance Outputable DefMeth where ppr DefMeth = text "{- has default method -}" ppr GenDefMeth = text "{- has generic method -}" ppr NoDefMeth = empty -- No default method -\end{code} +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] +\end{code} |