summaryrefslogtreecommitdiff
path: root/compiler/utils/BooleanFormula.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/utils/BooleanFormula.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/utils/BooleanFormula.hs')
-rw-r--r--compiler/utils/BooleanFormula.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/utils/BooleanFormula.hs b/compiler/utils/BooleanFormula.hs
index 41ac13963e..382431e549 100644
--- a/compiler/utils/BooleanFormula.hs
+++ b/compiler/utils/BooleanFormula.hs
@@ -193,7 +193,7 @@ pprBooleanFormula :: (Rational -> a -> SDoc) -> Rational -> BooleanFormula a ->
pprBooleanFormula pprVar = pprBooleanFormula' pprVar pprAnd pprOr
where
pprAnd p = cparen (p > 3) . fsep . punctuate comma
- pprOr p = cparen (p > 2) . fsep . intersperse (text "|")
+ pprOr p = cparen (p > 2) . fsep . intersperse vbar
-- Pretty print human in readable format, "either `a' or `b' or (`c', `d' and `e')"?
pprBooleanFormulaNice :: Outputable a => BooleanFormula a -> SDoc