From 8f96324584095764d769210a722c6b0defc5ec0e Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Wed, 23 May 2018 12:23:16 +0200 Subject: [PATCH] haskell-lambdabot-core: apply patch from @int-e to fix GHC 8.4.x build --- .../haskell-modules/configuration-ghc-8.4.x.nix | 2 ++ .../patches/lambdabot-core-ghc-8.4.x-fix.patch | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 pkgs/development/haskell-modules/patches/lambdabot-core-ghc-8.4.x-fix.patch diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix index 83d97c64b48b..0adaa5f274c3 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix @@ -448,4 +448,6 @@ self: super: { sha256 = "1bpsqq80h6nxm04wddgcgyzn0fjfsmhccmqb211jqswv5209znx8"; }); + lambdabot-core = appendPatch super.lambdabot-core ./patches/lambdabot-core-ghc-8.4.x-fix.patch; + } diff --git a/pkgs/development/haskell-modules/patches/lambdabot-core-ghc-8.4.x-fix.patch b/pkgs/development/haskell-modules/patches/lambdabot-core-ghc-8.4.x-fix.patch new file mode 100644 index 000000000000..9b7b7cfb8f96 --- /dev/null +++ b/pkgs/development/haskell-modules/patches/lambdabot-core-ghc-8.4.x-fix.patch @@ -0,0 +1,15 @@ +index 60e134c..246d8ca 100644 +--- lambdabot-core/src/Lambdabot/Config.hs ++++ lambdabot-core/src/Lambdabot/Config.hs +@@ -29,9 +29,9 @@ import Data.Typeable + import Data.Generics (everywhere, mkT) + import Language.Haskell.TH + +-data Config t where Config :: (Typeable1 k, GCompare k) => !(k t) -> t -> (t -> t -> t) -> Config t ++data Config t where Config :: (Typeable k, GCompare k) => !(k t) -> t -> (t -> t -> t) -> Config t + +-cast1 :: (Typeable1 f, Typeable1 g) => f a -> Maybe (g a) ++cast1 :: (Typeable f, Typeable g) => f a -> Maybe (g a) + cast1 = fmap runIdentity . gcast1 . Identity + + instance GEq Config where