summaryrefslogtreecommitdiff
path: root/dev-haskell/fgl/files/fgl-5.6.0.0-ghc-8.6.patch
blob: 0e3f35425ee17019bcb7eb1293b31e8962b00185 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
commit 344a7e452630ace0f5c647e525e0299d99de5902
Author: Alex Washburn <github@recursion.ninja>
Date:   Mon Aug 20 23:46:32 2018 -0400

    Fixing issue with MonadFailDesugaring.

diff --git a/Data/Graph/Inductive/Monad.hs b/Data/Graph/Inductive/Monad.hs
index 1d58af0..d63752b 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)