Skip to content

Commit 8aa3a31

Browse files
authored
GHC-8.0.1 compatability fixes (#36)
* Support for QuickCheck-2.9 As requested by commercialhaskell/stackage#1691 * Test with 8.0.1 on Travis-CI * Remove redundant constraints * Make `cabal check` happy
1 parent 9ce7112 commit 8aa3a31

File tree

5 files changed

+12
-14
lines changed

5 files changed

+12
-14
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ matrix:
3232
- env: CABALVER=1.22 GHCVER=7.10.2
3333
compiler: ": #GHC 7.10.2"
3434
addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.2], sources: [hvr-ghc]}}
35+
- env: CABALVER=1.24 GHCVER=8.0.1
36+
compiler: ": #GHC 8.0.1"
37+
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1], sources: [hvr-ghc]}}
3538
- env: CABALVER=head GHCVER=head
3639
compiler: ": #GHC head"
3740
addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}

Data/Graph/Inductive/NodeMap.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,16 +223,16 @@ liftM1' f c =
223223
return r
224224

225225
-- | Monadic node construction.
226-
mkNodeM :: (Ord a, DynGraph g) => a -> NodeMapM a b g (LNode a)
226+
mkNodeM :: (Ord a) => a -> NodeMapM a b g (LNode a)
227227
mkNodeM = liftN2 mkNode
228228

229-
mkNodesM :: (Ord a, DynGraph g) => [a] -> NodeMapM a b g [LNode a]
229+
mkNodesM :: (Ord a) => [a] -> NodeMapM a b g [LNode a]
230230
mkNodesM = liftN2 mkNodes
231231

232-
mkEdgeM :: (Ord a, DynGraph g) => (a, a, b) -> NodeMapM a b g (Maybe (LEdge b))
232+
mkEdgeM :: (Ord a) => (a, a, b) -> NodeMapM a b g (Maybe (LEdge b))
233233
mkEdgeM = liftN2' mkEdge
234234

235-
mkEdgesM :: (Ord a, DynGraph g) => [(a, a, b)] -> NodeMapM a b g (Maybe [LEdge b])
235+
mkEdgesM :: (Ord a) => [(a, a, b)] -> NodeMapM a b g (Maybe [LEdge b])
236236
mkEdgesM = liftN2' mkEdges
237237

238238
insMapNodeM :: (Ord a, DynGraph g) => a -> NodeMapM a b g (LNode a)

Data/Graph/Inductive/Query/GVD.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ maybePath v = listToMaybe . filter ((v==) . fst . head . unLPath)
5050

5151
-- | Try to determine the nearest root node to the one specified in the
5252
-- shortest path forest.
53-
nearestNode :: (Real b) => Node -> Voronoi b -> Maybe Node
53+
nearestNode :: Node -> Voronoi b -> Maybe Node
5454
nearestNode v = fmap (fst . last . unLPath) . maybePath v
5555

5656
-- | The distance to the 'nearestNode' (if there is one) in the

fgl-arbitrary/fgl-arbitrary.cabal

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,12 @@ library
2929
-- other-extensions:
3030
build-depends: base < 5
3131
, fgl >= 5.5.2.0 && < 6
32-
, QuickCheck >= 2.3 && < 2.9
32+
, QuickCheck >= 2.3 && < 2.10
3333
-- hs-source-dirs:
3434
default-language: Haskell2010
3535

3636
ghc-options: -Wall
3737

38-
ghc-prof-options: -prof -auto
39-
4038
test-suite fgl-arbitrary-tests
4139
default-language: Haskell2010
4240

@@ -45,7 +43,7 @@ test-suite fgl-arbitrary-tests
4543
build-depends: fgl-arbitrary
4644
, fgl
4745
, base
48-
, QuickCheck >= 2.3 && < 2.9
46+
, QuickCheck >= 2.3 && < 2.10
4947
, hspec >= 2.1 && < 2.3
5048
, containers
5149

@@ -54,5 +52,3 @@ test-suite fgl-arbitrary-tests
5452
main-is: TestSuite.hs
5553

5654
ghc-options: -Wall
57-
58-
ghc-prof-options: -prof -auto

fgl.cabal

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ 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 == 7.11.*
21+
GHC == 7.8.4, GHC == 7.10.2, GHC == 8.0.1, GHC == 8.1.*
2222

2323
source-repository head
2424
type: git
@@ -89,7 +89,7 @@ test-suite fgl-tests {
8989

9090
build-depends: fgl
9191
, base
92-
, QuickCheck >= 2.8 && < 2.9
92+
, QuickCheck >= 2.8 && < 2.10
9393
, hspec >= 2.1 && < 2.3
9494
, containers
9595

@@ -105,5 +105,4 @@ test-suite fgl-tests {
105105

106106
ghc-options: -Wall
107107

108-
ghc-prof-options: -prof -auto
109108
}

0 commit comments

Comments
 (0)