diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+5.7.0.0
+-------
+
+* Updating the GraphM class to be compatible with the MonadFail proposal and GHC's
+  MonadFailDesugaring language extension which is enabled by default by GHC-8.6.1.
+
 5.6.0.0
 -------
 
diff --git a/Data/Graph/Inductive/Monad.hs b/Data/Graph/Inductive/Monad.hs
--- 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 @@
 
 
 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 @@
 
 -- 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/Data/Graph/Inductive/PatriciaTree.hs b/Data/Graph/Inductive/PatriciaTree.hs
--- a/Data/Graph/Inductive/PatriciaTree.hs
+++ b/Data/Graph/Inductive/PatriciaTree.hs
@@ -32,6 +32,7 @@
 import qualified Data.IntMap         as IM
 import           Data.List           (foldl', sort)
 import           Data.Maybe          (fromMaybe)
+import           Data.Tuple          (swap)
 
 #if MIN_VERSION_containers (0,4,2)
 import Control.DeepSeq (NFData(..))
@@ -258,9 +259,6 @@
 
 fromContext :: Context a b -> Context' a b
 fromContext (ps, _, a, ss) = (fromAdj ps, a, fromAdj ss)
-
-swap :: (a, b) -> (b, a)
-swap (a, b) = (b, a)
 
 -- A version of @++@ where order isn't important, so @xs ++ [x]@
 -- becomes @x:xs@.  Used when we have to have a function of type @[a]
diff --git a/Data/Graph/Inductive/Query/DFS.hs b/Data/Graph/Inductive/Query/DFS.hs
--- a/Data/Graph/Inductive/Query/DFS.hs
+++ b/Data/Graph/Inductive/Query/DFS.hs
@@ -50,7 +50,7 @@
 import Data.Tree
 import qualified Data.Map as Map
 import Control.Monad (liftM2)
-
+import Data.Tuple (swap)
 
 
 -- | Many functions take a list of nodes to visit as an explicit argument.
@@ -243,8 +243,6 @@
     sccs = scc gr
     vs = zip [1..] sccs
     vMap = Map.fromList $ map swap vs
-
-    swap = uncurry $ flip (,)
 
     getN = (vMap Map.!)
     es = [ (getN c1, getN c2, ()) | c1 <- sccs, c2 <- sccs
diff --git a/Data/Graph/Inductive/Query/MaxFlow.hs b/Data/Graph/Inductive/Query/MaxFlow.hs
--- a/Data/Graph/Inductive/Query/MaxFlow.hs
+++ b/Data/Graph/Inductive/Query/MaxFlow.hs
@@ -108,7 +108,7 @@
 
 -- | Compute the flow from s to t on a graph whose edges are labeled with
 --   @x@, which is the max capacity and where not all edges need to be
---   of the form a\<---->b. Return the flow as a grap whose edges are
+--   of the form a\<---->b. Return the flow as a graph whose edges are
 --   labeled with (x,y,z)=(max capacity,current flow,residual
 --   capacity) and all edges are of the form a\<---->b
 mf :: (DynGraph gr, Num b, Ord b) => gr a b -> Node -> Node -> gr a (b,b,b)
diff --git a/fgl.cabal b/fgl.cabal
--- a/fgl.cabal
+++ b/fgl.cabal
@@ -1,5 +1,5 @@
 name:          fgl
-version:       5.6.0.0
+version:       5.7.0.0
 license:       BSD3
 license-file:  LICENSE
 author:        Martin Erwig, Ivan Lazar Miljenovic
@@ -18,7 +18,8 @@
                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
@@ -65,7 +66,7 @@
     other-modules:
         Paths_fgl
 
-    build-depends:    base < 5
+    build-depends:    base >= 4.3 && < 5
                     , transformers
                     , array
 
@@ -90,8 +91,8 @@
 
     build-depends:    fgl
                     , base
-                    , QuickCheck >= 2.8 && < 2.10
-                    , hspec >= 2.1 && < 2.5
+                    , QuickCheck >= 2.8 && < 2.12
+                    , hspec >= 2.1 && < 2.6
                     , containers
 
     hs-source-dirs:   test
