Skip to content

Commit 4381a44

Browse files
authored
Merge pull request #80 from recursion-ninja/master
Fixing build with MonadFailDesugaring
2 parents 80c3e0f + d49cd7b commit 4381a44

File tree

4 files changed

+30
-4
lines changed

4 files changed

+30
-4
lines changed

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ matrix:
3838
- env: CABALVER=1.24 GHCVER=8.0.1
3939
compiler: ": #GHC 8.0.1"
4040
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1], sources: [hvr-ghc]}}
41+
- env: CABALVER=2.0 GHCVER=8.2.2
42+
compiler: ": #GHC 8.2.2"
43+
addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2], sources: [hvr-ghc]}}
44+
- env: CABALVER=2.2 GHCVER=8.4.3
45+
compiler: ": #GHC 8.4.3"
46+
addons: {apt: {packages: [cabal-install-2.2,ghc-8.4.3], sources: [hvr-ghc]}}
47+
- env: CABALVER=2.4 GHCVER=8.6.1
48+
compiler: ": #GHC 8.6.1"
49+
addons: {apt: {packages: [cabal-install-2.4,ghc-8.6.1], sources: [hvr-ghc]}}
4150
- env: CABALVER=head GHCVER=head
4251
compiler: ": #GHC head"
4352
addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}

ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
5.7.0.0
2+
-------
3+
4+
* Updating the GraphM class to be compatible with the MonadFail proposal and GHC's
5+
MonadFailDesugaring language extension which is enabled by default by GHC-8.6.1.
6+
17
5.6.0.0
28
-------
39

Data/Graph/Inductive/Monad.hs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# LANGUAGE MultiParamTypeClasses #-}
1+
{-# LANGUAGE CPP, MultiParamTypeClasses #-}
22

33
-- (c) 2002 by Martin Erwig [see file COPYRIGHT]
44
-- | Monadic Graphs
@@ -19,6 +19,10 @@ module Data.Graph.Inductive.Monad(
1919

2020

2121
import Data.Graph.Inductive.Graph
22+
#if MIN_VERSION_base(4,12,0)
23+
import Control.Monad.Fail
24+
import Prelude hiding (fail)
25+
#endif
2226

2327
{-# ANN module "HLint: ignore Redundant lambda" #-}
2428

@@ -39,7 +43,13 @@ import Data.Graph.Inductive.Graph
3943

4044
-- Monadic Graph
4145
--
42-
class (Monad m) => GraphM m gr where
46+
class
47+
#if MIN_VERSION_base(4,12,0)
48+
(MonadFail m)
49+
#else
50+
(Monad m)
51+
#endif
52+
=> GraphM m gr where
4353
{-# MINIMAL emptyM, isEmptyM, matchM, mkGraphM, labNodesM #-}
4454

4555
emptyM :: m (gr a b)

fgl.cabal

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: fgl
2-
version: 5.6.0.0
2+
version: 5.7.0.0
33
license: BSD3
44
license-file: LICENSE
55
author: Martin Erwig, Ivan Lazar Miljenovic
@@ -18,7 +18,8 @@ extra-source-files:
1818
ChangeLog
1919

2020
tested-with: GHC == 7.0.4, GHC == 7.2.2, GHC == 7.4.2, GHC == 7.6.3,
21-
GHC == 7.8.4, GHC == 7.10.2, GHC == 8.0.1, GHC == 8.1.*
21+
GHC == 7.8.4, GHC == 7.10.2, GHC == 8.0.1, GHC == 8.2.2,
22+
GHC == 8.4.3, GHC == 8.6.1
2223

2324
source-repository head
2425
type: git

0 commit comments

Comments
 (0)