[commit: ghc] type-holes-branch: Added a couple of outputable instances. (de271bd)

Simon Peyton Jones <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : type-holes-branch

http://hackage.haskell.org/trac/ghc/changeset/de271bd8277510a9e2f09812e5be4d40e6c23cb4

>---------------------------------------------------------------

commit de271bd8277510a9e2f09812e5be4d40e6c23cb4
Author: Thijs Alkemade <[email protected]>
Date:   Thu Jan 5 11:29:02 2012 +0100

    Added a couple of outputable instances.

>---------------------------------------------------------------

 compiler/typecheck/TcType.lhs |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/compiler/typecheck/TcType.lhs b/compiler/typecheck/TcType.lhs
index d4d2642..5967667 100644
--- a/compiler/typecheck/TcType.lhs
+++ b/compiler/typecheck/TcType.lhs
@@ -304,6 +304,12 @@ data TcTyVarDetails
           
   | MetaTv MetaInfo (IORef MetaDetails)
 
+instance Outputable TcTyVarDetails where
+  ppr (SkolemTv b)    = ptext (sLit "SkolemTv") <+> ppr b
+  ppr RuntimeUnk      = ptext (sLit "RuntimeUnk")
+  ppr (FlatSkol ty)   = ptext (sLit "FlatSkol") <+> ppr ty
+  ppr (MetaTv info _) = ptext (sLit "MetaTv") <+> ppr info
+
 vanillaSkolemTv, superSkolemTv :: TcTyVarDetails
 -- See Note [Binding when looking up instances] in InstEnv
 vanillaSkolemTv = SkolemTv False  -- Might be instantiated
@@ -338,6 +344,11 @@ data MetaInfo
 -- UserTypeCtxt describes the origin of the polymorphic type
 -- in the places where we need to an expression has that type
 
+instance Outputable MetaInfo where
+  ppr TauTv = ptext (sLit "TauTv")
+  ppr SigTv = ptext (sLit "SigTv")
+  ppr TcsTv = ptext (sLit "TcsTv")
+
 data UserTypeCtxt
   = FunSigCtxt Name	-- Function type signature
 			-- Also used for types in SPECIALISE pragmas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.