projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Minor refactoring: give an explicit name to the pretty-printing function for TyThing...
[ghc-hetmet.git]
/
compiler
/
types
/
TypeRep.lhs
diff --git
a/compiler/types/TypeRep.lhs
b/compiler/types/TypeRep.lhs
index
1b2f56d
..
c694dc8
100644
(file)
--- a/
compiler/types/TypeRep.lhs
+++ b/
compiler/types/TypeRep.lhs
@@
-23,7
+23,7
@@
module TypeRep (
-- Pretty-printing
pprType, pprParendType, pprTypeApp,
-- Pretty-printing
pprType, pprParendType, pprTypeApp,
- pprTyThingCategory,
+ pprTyThing, pprTyThingCategory,
pprPred, pprTheta, pprForAll, pprThetaArrow, pprClassPred,
-- Kinds
pprPred, pprTheta, pprForAll, pprThetaArrow, pprClassPred,
-- Kinds
@@
-292,8
+292,11
@@
data TyThing = AnId Id
| ATyCon TyCon
| AClass Class
| ATyCon TyCon
| AClass Class
-instance Outputable TyThing where
- ppr thing = pprTyThingCategory thing <+> quotes (ppr (getName thing))
+instance Outputable TyThing where
+ ppr = pprTyThing
+
+pprTyThing :: TyThing -> SDoc
+pprTyThing thing = pprTyThingCategory thing <+> quotes (ppr (getName thing))
pprTyThingCategory :: TyThing -> SDoc
pprTyThingCategory (ATyCon _) = ptext SLIT("Type constructor")
pprTyThingCategory :: TyThing -> SDoc
pprTyThingCategory (ATyCon _) = ptext SLIT("Type constructor")