summaryrefslogtreecommitdiff
path: root/dev-lang/ghc/files/ghc-8.10.5-modorigin-verbose-conflict.patch
blob: a34c0c9059fe000f0904d5009059b73d36f0375a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- a/compiler/main/Packages.hs
+++ b/compiler/main/Packages.hs
@@ -219,12 +219,14 @@ fromFlag = ModOrigin Nothing [] [] True
 instance Semigroup ModuleOrigin where
     ModOrigin e res rhs f <> ModOrigin e' res' rhs' f' =
         ModOrigin (g e e') (res ++ res') (rhs ++ rhs') (f || f')
-      where g (Just b) (Just b')
+      where g x@(Just b) y@(Just b')
                 | b == b'   = Just b
-                | otherwise = panic "ModOrigin: package both exposed/hidden"
+                | otherwise = pprPanic "ModOrigin: package both exposed/hidden" $
+                                text "x: " <> ppr x $$ text "y: " <> ppr y
             g Nothing x = x
             g x Nothing = x
-    _x <> _y = panic "ModOrigin: hidden module redefined"
+    x <> y = pprPanic "ModOrigin: hidden module redefined" $
+               text "x: " <> ppr x $$ text "y: " <> ppr y
 
 instance Monoid ModuleOrigin where
     mempty = ModOrigin Nothing [] [] False