-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop Fold, simplify ToGraph, refactor testsuite (#205)
This revision addresses a few issues: * Improves the testsuite (#13) by switching to simpler graph `API` type class. * Simplifies the `ToGraph` class, as discussed in #151. * Removes `Algebra.Graph.Fold` which, while cool, appears to be useless in practice. * Removes dependencies on `base-compat` and `base-orphans`, which are no longer critical.
- Loading branch information
1 parent
c82eea5
commit c20d1b2
Showing
42 changed files
with
798 additions
and
1,303 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
----------------------------------------------------------------------------- | ||
-- | | ||
-- Module : Algebra.Graph | ||
-- Copyright : (c) Andrey Mokhov 2016-2018 | ||
-- Copyright : (c) Andrey Mokhov 2016-2019 | ||
-- License : MIT (see the file LICENSE) | ||
-- Maintainer : [email protected] | ||
-- Stability : experimental | ||
|
@@ -50,12 +50,9 @@ module Algebra.Graph ( | |
Context (..), context | ||
) where | ||
|
||
import Prelude () | ||
import Prelude.Compat | ||
|
||
import Control.Applicative (Alternative) | ||
import Control.DeepSeq (NFData (..)) | ||
import Control.Monad.Compat | ||
import Control.Monad (MonadPlus (..)) | ||
import Control.Monad.State (runState, get, put) | ||
import Data.Foldable (toList) | ||
import Data.Maybe (fromMaybe) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
----------------------------------------------------------------------------- | ||
-- | | ||
-- Module : Algebra.Graph.AdjacencyIntMap.Internal | ||
-- Copyright : (c) Andrey Mokhov 2016-2018 | ||
-- Copyright : (c) Andrey Mokhov 2016-2019 | ||
-- License : MIT (see the file LICENSE) | ||
-- Maintainer : [email protected] | ||
-- Stability : unstable | ||
|
@@ -14,19 +14,15 @@ | |
module Algebra.Graph.AdjacencyIntMap.Internal ( | ||
-- * Adjacency map implementation | ||
AdjacencyIntMap (..), consistent | ||
) where | ||
) where | ||
|
||
import Prelude () | ||
import Prelude.Compat hiding (null) | ||
|
||
import Data.Monoid (Sum (..)) | ||
import Control.DeepSeq (NFData (..)) | ||
import Data.IntMap.Strict (IntMap, keysSet, fromSet) | ||
import Data.IntSet (IntSet) | ||
import Data.List | ||
import Data.Monoid (Sum (..)) | ||
import GHC.Generics | ||
|
||
import Control.DeepSeq (NFData (..)) | ||
|
||
import qualified Data.IntMap.Strict as IntMap | ||
import qualified Data.IntSet as IntSet | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
----------------------------------------------------------------------------- | ||
-- | | ||
-- Module : Algebra.Graph.AdjacencyMap.Internal | ||
-- Copyright : (c) Andrey Mokhov 2016-2018 | ||
-- Copyright : (c) Andrey Mokhov 2016-2019 | ||
-- License : MIT (see the file LICENSE) | ||
-- Maintainer : [email protected] | ||
-- Stability : unstable | ||
|
@@ -14,10 +14,7 @@ | |
module Algebra.Graph.AdjacencyMap.Internal ( | ||
-- * Adjacency map implementation | ||
AdjacencyMap (..), consistent, internalEdgeList, referredToVertexSet | ||
) where | ||
|
||
import Prelude () | ||
import Prelude.Compat hiding (null) | ||
) where | ||
|
||
import Control.DeepSeq | ||
import Data.List | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
----------------------------------------------------------------------------- | ||
-- | | ||
-- Module : Algebra.Graph.Export | ||
-- Copyright : (c) Andrey Mokhov 2016-2018 | ||
-- Copyright : (c) Andrey Mokhov 2016-2019 | ||
-- License : MIT (see the file LICENSE) | ||
-- Maintainer : [email protected] | ||
-- Stability : experimental | ||
|
@@ -23,14 +23,12 @@ module Algebra.Graph.Export ( | |
|
||
-- * Generic graph export | ||
export | ||
) where | ||
|
||
import Prelude () | ||
import Prelude.Compat hiding (unlines) | ||
) where | ||
|
||
import Data.Foldable (fold) | ||
import Data.Semigroup | ||
import Data.String hiding (unlines) | ||
import Prelude hiding (unlines) | ||
|
||
import Algebra.Graph.ToGraph (ToGraph, ToVertex, toAdjacencyMap) | ||
import Algebra.Graph.AdjacencyMap (vertexList, edgeList) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.