summaryrefslogtreecommitdiff
path: root/compiler/deSugar/DsUtils.hs
diff options
context:
space:
mode:
authorMichał Sośnicki <sosnicki.michal@gmail.com>2015-11-18 16:02:53 +0100
committerBen Gamari <ben@smart-cactus.org>2015-11-18 17:31:20 +0100
commitc61759d5917996a10b06a286eb5b776e4069e35c (patch)
tree7fc3b9a29cec4f98e28278d23e5000743d0d3956 /compiler/deSugar/DsUtils.hs
parent07eb258dfcbf8a67e4e931397128b7255356d19e (diff)
downloadhaskell-c61759d5917996a10b06a286eb5b776e4069e35c.tar.gz
Fix inconsistent pretty-printing of type families
After the changes, the three functions used to print type families were identical, so they are refactored into one. Original RHSs of data instance declarations are recreated and printed in user error messages. RHSs containing representation TyCons are printed in the Coercion Axioms section in a typechecker dump. Add vbar to the list of SDocs exported by Outputable. Replace all text "|" docs with it. Fixes #10839 Reviewers: goldfire, jstolarek, austin, bgamari Reviewed By: jstolarek Subscribers: jstolarek, thomie Differential Revision: https://phabricator.haskell.org/D1441 GHC Trac Issues: #10839
Diffstat (limited to 'compiler/deSugar/DsUtils.hs')
-rw-r--r--compiler/deSugar/DsUtils.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/deSugar/DsUtils.hs b/compiler/deSugar/DsUtils.hs
index a14c608d1c..98f7f0f051 100644
--- a/compiler/deSugar/DsUtils.hs
+++ b/compiler/deSugar/DsUtils.hs
@@ -463,7 +463,7 @@ mkErrorAppDs err_id ty msg = do
src_loc <- getSrcSpanDs
dflags <- getDynFlags
let
- full_msg = showSDoc dflags (hcat [ppr src_loc, text "|", msg])
+ full_msg = showSDoc dflags (hcat [ppr src_loc, vbar, msg])
core_msg = Lit (mkMachString full_msg)
-- mkMachString returns a result of type String#
return (mkApps (Var err_id) [Type ty, core_msg])