summaryrefslogtreecommitdiff
path: root/dev-lang/ghc/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-07-23 02:48:52 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-07-23 02:48:52 +0100
commitfd70f5e3ed54d5e013c11a3f3e632e80838171d0 (patch)
treec6bf0dac8239e644ccc09b184e4eb9cca9701dcf /dev-lang/ghc/files
parent5deadca7219297a3c1f90eca00544a00e33efdbc (diff)
gentoo auto-resync : 23:07:2022 - 02:48:51
Diffstat (limited to 'dev-lang/ghc/files')
-rw-r--r--dev-lang/ghc/files/ghc-9.0.2-modorigin-semigroup.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/dev-lang/ghc/files/ghc-9.0.2-modorigin-semigroup.patch b/dev-lang/ghc/files/ghc-9.0.2-modorigin-semigroup.patch
new file mode 100644
index 000000000000..75e84df4ab66
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-9.0.2-modorigin-semigroup.patch
@@ -0,0 +1,27 @@
+From bad99a0bb7981c0287dbc383176338acea98a2d5 Mon Sep 17 00:00:00 2001
+From: Sylvain Henry <sylvain@haskus.fr>
+Date: Fri, 18 Feb 2022 11:01:04 +0100
+Subject: [PATCH] Quick and dirty fix for ModuleOrigin SemiGroup instance
+Bug: https://github.com/gentoo-haskell/gentoo-haskell/issues/1250#issuecomment-1044257595
+Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/21097
+Signed-off-by: hololeap <hololeap@protonmail.com>
+
+---
+diff -urN ghc-9.0.2/compiler/GHC/Unit/State.hs ghc-9.0.2-r1/compiler/GHC/Unit/State.hs
+--- ghc-9.0.2/compiler/GHC/Unit/State.hs 2021-10-19 05:20:00.000000000 -0600
++++ ghc-9.0.2-r1/compiler/GHC/Unit/State.hs 2022-02-19 20:26:16.756489309 -0700
+@@ -235,6 +235,14 @@
+ | otherwise = panic "ModOrigin: package both exposed/hidden"
+ g Nothing x = x
+ g x Nothing = x
++ ModHidden <> ModHidden = ModHidden
++ ModUnusable x <> ModUnusable _y = ModUnusable x
++
++ ModUnusable _ <> ModHidden = ModHidden
++ ModHidden <> ModUnusable _ = ModHidden
++ ModUnusable _x <> y@ModOrigin{} = y
++ x@ModOrigin{} <> ModUnusable _y = x
++
+ _x <> _y = panic "ModOrigin: hidden module redefined"
+
+ instance Monoid ModuleOrigin where