[commit: ghc] wip/spj-temp: Add Outputable Report in TcErrors (edec5b3)
git at git.haskell.org
git at git.haskell.org
Thu Sep 29 08:37:06 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/spj-temp
Link : http://ghc.haskell.org/trac/ghc/changeset/edec5b33b5fc5bebce936decbadbe9df2b7d8074/ghc
>---------------------------------------------------------------
commit edec5b33b5fc5bebce936decbadbe9df2b7d8074
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Sun Sep 25 15:48:29 2016 +0100
Add Outputable Report in TcErrors
...just for debug output
>---------------------------------------------------------------
edec5b33b5fc5bebce936decbadbe9df2b7d8074
compiler/typecheck/TcErrors.hs | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/compiler/typecheck/TcErrors.hs b/compiler/typecheck/TcErrors.hs
index b27e073..8f2cfe8 100644
--- a/compiler/typecheck/TcErrors.hs
+++ b/compiler/typecheck/TcErrors.hs
@@ -216,6 +216,11 @@ data Report
, report_relevant_bindings :: [SDoc]
}
+instance Outputable Report where -- Debugging only
+ ppr (Report { report_important = imp, report_relevant_bindings = rel })
+ = vcat [ text "important:" <+> vcat imp
+ , text "relevant:" <+> vcat rel ]
+
{- Note [Error report]
The idea is that error msgs are divided into three parts: the main msg, the
context block (\"In the second argument of ...\"), and the relevant bindings
More information about the ghc-commits
mailing list