commit 344a7e452630ace0f5c647e525e0299d99de5902 Author: Alex Washburn 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)