[commit: ghc] master: A bit more tc-tracing (47031db)

git at git.haskell.org git at git.haskell.org
Wed Jan 31 11:36:30 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/47031db4ba0677ede438526770ab23908257fc5c/ghc

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

commit 47031db4ba0677ede438526770ab23908257fc5c
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed Jan 31 11:35:20 2018 +0000

    A bit more tc-tracing


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

47031db4ba0677ede438526770ab23908257fc5c
 compiler/typecheck/TcSMonad.hs | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/compiler/typecheck/TcSMonad.hs b/compiler/typecheck/TcSMonad.hs
index af77a2c..e732fdd 100644
--- a/compiler/typecheck/TcSMonad.hs
+++ b/compiler/typecheck/TcSMonad.hs
@@ -421,11 +421,15 @@ data InertSet
        }
 
 instance Outputable InertSet where
-  ppr is = vcat [ ppr $ inert_cans is
-                , ppUnless (null dicts) $
-                  text "Solved dicts" <+> vcat (map ppr dicts) ]
+  ppr (IS { inert_cans = ics
+          , inert_fsks = ifsks
+          , inert_solved_dicts = solved_dicts })
+      = vcat [ ppr ics
+             , text "Inert fsks =" <+> ppr ifsks
+             , ppUnless (null dicts) $
+               text "Solved dicts =" <+> vcat (map ppr dicts) ]
          where
-           dicts = bagToList (dictsToBag (inert_solved_dicts is))
+           dicts = bagToList (dictsToBag solved_dicts)
 
 emptyInert :: InertSet
 emptyInert
@@ -2899,6 +2903,7 @@ unflattenGivens :: IORef InertSet -> TcM ()
 -- is nicely paired with the creation an empty inert_fsks list.
 unflattenGivens inert_var
  = do { inerts <- TcM.readTcRef inert_var
+       ; TcM.traceTc "unflattenGivens" (ppr (inert_fsks inerts))
        ; mapM_ flatten_one (inert_fsks inerts) }
   where
     flatten_one (fsk, ty) = TcM.writeMetaTyVar fsk ty



More information about the ghc-commits mailing list