Tidy up typechecking for newtypes
[ghc-hetmet.git] / compiler / ghci / RtClosureInspect.hs
index f653de6..8fd15c0 100644 (file)
@@ -39,8 +39,6 @@ module RtClosureInspect(
      isPointed,
      isFullyEvaluatedTerm,
 --     unsafeDeepSeq, 
-     
-     sigmaType
  ) where 
 
 #include "HsVersions.h"
@@ -315,8 +313,9 @@ printTerm :: Term -> SDoc
 printTerm Prim{value=value} = text value 
 printTerm t@Term{} = printTerm1 0 t 
 printTerm Suspension{bound_to=Nothing} =  char '_' -- <> ppr ct <> char '_'
-printTerm Suspension{mb_ty=Just ty, bound_to=Just n} =
-  parens$ ppr n <> text "::" <> ppr ty 
+printTerm Suspension{mb_ty=Just ty, bound_to=Just n}
+  | Just _ <- splitFunTy_maybe ty = text "<function>"
+  | otherwise = parens$ ppr n <> text "::" <> ppr ty 
 
 printTerm1 p Term{dc=dc, subTerms=tt} 
 {-  | dataConIsInfix dc, (t1:t2:tt') <- tt 
@@ -571,7 +570,7 @@ zonkTerm = foldTerm idTermFoldM {
 
 
 -- Is this defined elsewhere?
--- Find all free tyvars and insert the appropiate ForAll.
+-- Generalize the type: find all free tyvars and wrap in the appropiate ForAll.
 sigmaType ty = mkForAllTys (varSetElems$ tyVarsOfType (dropForAlls ty)) ty
 
 {-