[commit: ghc] master: Add Outputable Report in TcErrors (3012c43)
git at git.haskell.org
git at git.haskell.org
Fri Sep 30 11:54:32 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/3012c431e466c55fccff0dd916987a9478cb1ae3/ghc
>---------------------------------------------------------------
commit 3012c431e466c55fccff0dd916987a9478cb1ae3
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
>---------------------------------------------------------------
3012c431e466c55fccff0dd916987a9478cb1ae3
compiler/typecheck/TcErrors.hs | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/compiler/typecheck/TcErrors.hs b/compiler/typecheck/TcErrors.hs
index b27e073..d49ca64 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