summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorPhil de Joux <phil.dejoux@blockscope.com>2017-01-20 14:59:44 -0500
committerBen Gamari <ben@smart-cactus.org>2017-01-20 16:13:52 -0500
commit33140f41b931fb81bf2e5aa28603fe757bb3779d (patch)
treef284c1d4363fcea665be5aef2706ecfb3c5cea16 /ghc
parentd49b2bb21691892ca6ac8f2403e31f2a5e53feb3 (diff)
downloadhaskell-33140f41b931fb81bf2e5aa28603fe757bb3779d.tar.gz
Show explicit quantifiers in conflicting definitions error
This fixes #12441, where definitions in a Haskell module and its boot file which differed only in their quantifiers produced a confusing error message. Here we teach GHC to always show quantifiers for these errors. Reviewers: goldfire, simonmar, erikd, austin, hvr, bgamari Reviewed By: bgamari Subscribers: snowleopard, simonpj, mpickering, thomie Differential Revision: https://phabricator.haskell.org/D2734 GHC Trac Issues: #12441
Diffstat (limited to 'ghc')
-rw-r--r--ghc/GHCi/UI.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs
index 29f423869d..18d72dfa0e 100644
--- a/ghc/GHCi/UI.hs
+++ b/ghc/GHCi/UI.hs
@@ -56,6 +56,7 @@ import Module
import Name
import Packages ( trusted, getPackageDetails, getInstalledPackageDetails,
listVisibleModuleNames, pprFlag )
+import IfaceSyn ( showToHeader )
import PprTyThing
import PrelNames
import RdrName ( RdrName, getGRE_NameQualifier_maybes, getRdrName )
@@ -2135,8 +2136,8 @@ browseModule bang modl exports_only = do
let things | bang = catMaybes mb_things
| otherwise = filtered_things
- pretty | bang = pprTyThing
- | otherwise = pprTyThingInContext
+ pretty | bang = pprTyThing showToHeader
+ | otherwise = pprTyThingInContext showToHeader
labels [] = text "-- not currently imported"
labels l = text $ intercalate "\n" $ map qualifier l
@@ -2830,7 +2831,7 @@ showBindings = do
pprTT :: (TyThing, Fixity, [GHC.ClsInst], [GHC.FamInst]) -> SDoc
pprTT (thing, fixity, _cls_insts, _fam_insts)
- = pprTyThing thing
+ = pprTyThing showToHeader thing
$$ show_fixity
where
show_fixity
@@ -2839,7 +2840,7 @@ showBindings = do
printTyThing :: TyThing -> GHCi ()
-printTyThing tyth = printForUser (pprTyThing tyth)
+printTyThing tyth = printForUser (pprTyThing showToHeader tyth)
showBkptTable :: GHCi ()
showBkptTable = do