summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasperVanDerJeugt <>2019-01-11 23:50:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2019-01-11 23:50:00 (GMT)
commit953ba3f0255739342f634172784e830ea87d8e5a (patch)
treef2a374d89b92ee3732933ec7aefaea15e6aae3a2
parent6a7ef9d8008cb5469c3d720cf066cc2745780616 (diff)
version 0.1.0.20.1.0.2
-rw-r--r--CHANGELOG.md3
-rw-r--r--dynamic-graphs.cabal13
-rw-r--r--src/Data/Graph/Dynamic/Internal/Random.hs2
-rw-r--r--src/Data/Graph/Dynamic/Levels.hs4
4 files changed, 17 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9e89ced..037c46b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,8 @@
# CHANGELOG
+- 0.1.0.2 (2019-01-12)
+ * Fix build issues with GHC 8.6 and GHC 7.10
+
- 0.1.0.1 (2019-01-11)
* Restrict dependency versions somewhat
diff --git a/dynamic-graphs.cabal b/dynamic-graphs.cabal
index 50d4ddd..6d1dc39 100644
--- a/dynamic-graphs.cabal
+++ b/dynamic-graphs.cabal
@@ -1,5 +1,5 @@
Name: dynamic-graphs
-Version: 0.1.0.1
+Version: 0.1.0.2
Synopsis: Dynamic graph algorithms
Description: A library for dynamic graph algorithms, and in particular
dynamic connectivity.
@@ -7,7 +7,9 @@ License: BSD3
License-file: LICENSE
Author: Alex Lang, Jasper Van der Jeugt
Maintainer: me@alang.ca
-copyright: 2018 Alex Lang, Jasper Van der Jeugt
+Copyright: 2018-2019 Alex Lang, Jasper Van der Jeugt
+Homepage: http://github.com/alang9/dynamic-graphs
+Bug-reports: http://github.com/alang9/dynamic-graphs/issues
Category: Data
Build-type: Simple
Extra-source-files: CHANGELOG.md, README.md
@@ -18,6 +20,10 @@ Flag build-extra-executables
Default: False
Manual: True
+Source-repository head
+ Type: git
+ Location: git://github.com/alang9/dynamic-graphs.git
+
Library
Hs-source-dirs: src
Default-language: Haskell2010
@@ -38,8 +44,9 @@ Library
containers >= 0.3 && < 0.7,
hashable >= 1.0 && < 1.3,
hashtables >= 1.2 && < 1.3,
- mwc-random >= 0.12 && < 0.14,
+ mwc-random >= 0.12 && < 0.15,
primitive >= 0.5 && < 0.7,
+ semigroups >= 0.18 && < 0.19,
unordered-containers >= 0.2 && < 0.3,
vector >= 0.10 && < 0.13
diff --git a/src/Data/Graph/Dynamic/Internal/Random.hs b/src/Data/Graph/Dynamic/Internal/Random.hs
index 5b83db8..96ebbdf 100644
--- a/src/Data/Graph/Dynamic/Internal/Random.hs
+++ b/src/Data/Graph/Dynamic/Internal/Random.hs
@@ -58,7 +58,7 @@ data T s a v = T
--
-- They seem to offer similar performance. We choose to use the latter since it
-- is less likely to end up in infinite loops that way, and additionally, we can
--- move easily move e.g. x's left child to y's right child, even it is an empty
+-- more easily move e.g. x's left child to y's right child, even it is an empty
-- child.
nil :: Tree s a v
nil = unsafeCoerce $ unsafePerformIO $ Tree <$> MutVar.newMutVar undefined
diff --git a/src/Data/Graph/Dynamic/Levels.hs b/src/Data/Graph/Dynamic/Levels.hs
index cce4366..70b9ee9 100644
--- a/src/Data/Graph/Dynamic/Levels.hs
+++ b/src/Data/Graph/Dynamic/Levels.hs
@@ -235,7 +235,9 @@ cut (Graph levels) a b = do
aSize <- ET.componentSize etf a
bSize <- ET.componentSize etf b
let (smaller, _bigger) = if aSize <= bSize then (a, b) else (b, a)
- Just sRoot <- ET.findRoot etf smaller
+ sRoot <- fromMaybe
+ (error "root must exist because cut returned True") <$>
+ (ET.findRoot etf smaller)
-- These are all edges, and vertices within the smaller tree.
sTreeEdges <- Tree.toList sRoot