summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2016-09-25 15:48:29 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2016-09-30 12:53:24 +0100
commit3012c431e466c55fccff0dd916987a9478cb1ae3 (patch)
tree8a0e5c8fee20f17bac2cfbad0bfc07f55e0ecc60
parent66a8c194520aadcaa0482736f3fdd4d2f31a5586 (diff)
downloadhaskell-3012c431e466c55fccff0dd916987a9478cb1ae3.tar.gz
Add Outputable Report in TcErrors
...just for debug output
-rw-r--r--compiler/typecheck/TcErrors.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/typecheck/TcErrors.hs b/compiler/typecheck/TcErrors.hs
index b27e073082..d49ca64ca5 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