summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/patches
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2018-09-27 17:00:22 +0200
committerPeter Simons <simons@cryp.to>2018-09-28 11:16:42 +0200
commit35cf30bd8e85c11ffeb76ccf1fb23e38504628a0 (patch)
tree9c64f0d1c941ddba2d14228830f06ffdb596317a /pkgs/development/haskell-modules/patches
parent0ab8fa2181a5d6561de673a91d51a2a082622328 (diff)
downloadnixpkgs-35cf30bd8e85c11ffeb76ccf1fb23e38504628a0.tar
nixpkgs-35cf30bd8e85c11ffeb76ccf1fb23e38504628a0.tar.gz
nixpkgs-35cf30bd8e85c11ffeb76ccf1fb23e38504628a0.tar.bz2
nixpkgs-35cf30bd8e85c11ffeb76ccf1fb23e38504628a0.tar.lz
nixpkgs-35cf30bd8e85c11ffeb76ccf1fb23e38504628a0.tar.xz
nixpkgs-35cf30bd8e85c11ffeb76ccf1fb23e38504628a0.tar.zst
nixpkgs-35cf30bd8e85c11ffeb76ccf1fb23e38504628a0.zip
haskell-fgl: fix build with ghc-8.6.x
Diffstat (limited to 'pkgs/development/haskell-modules/patches')
-rw-r--r--pkgs/development/haskell-modules/patches/fgl-monad-fail.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/patches/fgl-monad-fail.patch b/pkgs/development/haskell-modules/patches/fgl-monad-fail.patch
new file mode 100644
index 00000000000..d0df9b774e4
--- /dev/null
+++ b/pkgs/development/haskell-modules/patches/fgl-monad-fail.patch
@@ -0,0 +1,61 @@
+From 344a7e452630ace0f5c647e525e0299d99de5902 Mon Sep 17 00:00:00 2001
+From: Alex Washburn <github@recursion.ninja>
+Date: Mon, 20 Aug 2018 23:46:32 -0400
+Subject: [PATCH] Fixing issue with MonadFailDesugaring.
+
+---
+ .travis.yml                   |  9 +++++++++
+ Data/Graph/Inductive/Monad.hs | 14 ++++++++++++--
+ fgl.cabal                     |  3 ++-
+ 3 files changed, 23 insertions(+), 3 deletions(-)
+
+diff --git a/.travis.yml b/.travis.yml
+index db5eeb1..f026dd1 100644
+--- a/Data/Graph/Inductive/Monad.hs
++++ b/Data/Graph/Inductive/Monad.hs
+@@ -1,4 +1,4 @@
+-{-# LANGUAGE MultiParamTypeClasses #-}
++{-# LANGUAGE CPP, MultiParamTypeClasses #-}
+ 
+ -- (c) 2002 by Martin Erwig [see file COPYRIGHT]
+ -- | Monadic Graphs
+@@ -19,6 +19,10 @@ module Data.Graph.Inductive.Monad(
+ 
+ 
+ import Data.Graph.Inductive.Graph
++#if MIN_VERSION_base(4,12,0)
++import Control.Monad.Fail
++import Prelude hiding (fail)
++#endif
+ 
+ {-# ANN module "HLint: ignore Redundant lambda" #-}
+ 
+@@ -39,7 +43,13 @@ import Data.Graph.Inductive.Graph
+ 
+ -- Monadic Graph
+ --
+-class (Monad m) => GraphM m gr where
++class
++#if MIN_VERSION_base(4,12,0)
++ (MonadFail m)
++#else
++ (Monad m)
++#endif
++  => GraphM m gr where
+   {-# MINIMAL emptyM, isEmptyM, matchM, mkGraphM, labNodesM #-}
+ 
+   emptyM     :: m (gr a b)
+diff --git a/fgl.cabal b/fgl.cabal
+index 4251a21..4b2a039 100644
+--- a/fgl.cabal
++++ b/fgl.cabal
+@@ -18,7 +18,8 @@ extra-source-files:
+                ChangeLog
+ 
+ tested-with:   GHC == 7.0.4, GHC == 7.2.2, GHC == 7.4.2, GHC == 7.6.3,
+-               GHC == 7.8.4, GHC == 7.10.2, GHC == 8.0.1, GHC == 8.1.*
++               GHC == 7.8.4, GHC == 7.10.2, GHC == 8.0.1, GHC == 8.2.2,
++               GHC == 8.4.3, GHC == 8.6.1
+ 
+ source-repository head
+     type:         git