Skip to content

Commit

Permalink
Drop Fold, simplify ToGraph, refactor testsuite
Browse files Browse the repository at this point in the history
See #13, #151
  • Loading branch information
snowleopard committed May 27, 2019
1 parent c82eea5 commit 1fbda0d
Show file tree
Hide file tree
Showing 12 changed files with 704 additions and 1,178 deletions.
6 changes: 1 addition & 5 deletions algebraic-graphs.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ description:
<http://hackage.haskell.org/package/algebraic-graphs/docs/Algebra-Graph-Class.html Algebra.Graph.Class>
and
<http://hackage.haskell.org/package/algebraic-graphs/docs/Algebra-Graph-HigherKinded-Class.html Algebra.Graph.HigherKinded.Class>
can be used for polymorphic construction and manipulation of graphs. Also see
<http://hackage.haskell.org/package/algebraic-graphs/docs/Algebra-Graph-Fold.html Algebra.Graph.Fold>
that defines the Boehm-Berarducci encoding of algebraic graphs.
can be used for polymorphic construction and manipulation of graphs.
.
This is an experimental library and the API is expected to remain unstable until version 1.0.0.
Please consider contributing to the on-going
Expand All @@ -77,7 +75,6 @@ library
Algebra.Graph.Class,
Algebra.Graph.Export,
Algebra.Graph.Export.Dot,
Algebra.Graph.Fold,
Algebra.Graph.HigherKinded.Class,
Algebra.Graph.Internal,
Algebra.Graph.Label,
Expand Down Expand Up @@ -137,7 +134,6 @@ test-suite test-alga
Algebra.Graph.Test.AdjacencyMap,
Algebra.Graph.Test.Arbitrary,
Algebra.Graph.Test.Export,
Algebra.Graph.Test.Fold,
Algebra.Graph.Test.Generic,
Algebra.Graph.Test.Graph,
Algebra.Graph.Test.Internal,
Expand Down
11 changes: 1 addition & 10 deletions src/Algebra/Graph/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
-- implemented fully polymorphically and require the use of an intermediate data
-- type are not included. For example, to compute the number of vertices in a
-- 'Graph' expression you will need to use a concrete data type, such as
-- "Algebra.Graph.Fold". Other useful 'Graph' instances are defined in
-- "Algebra.Graph", "Algebra.Graph.AdjacencyMap" and "Algebra.Graph.Relation".
-- "Algebra.Graph.Graph" or "Algebra.Graph.AdjacencyMap".
--
-- See "Algebra.Graph.HigherKinded.Class" for the higher-kinded version of the
-- core graph type class.
Expand Down Expand Up @@ -58,7 +57,6 @@ import qualified Algebra.Graph as G
import qualified Algebra.Graph.AdjacencyMap as AM
import qualified Algebra.Graph.Labelled as LG
import qualified Algebra.Graph.Labelled.AdjacencyMap as LAM
import qualified Algebra.Graph.Fold as F
import qualified Algebra.Graph.AdjacencyIntMap as AIM
import qualified Algebra.Graph.Relation as R
import qualified Algebra.Graph.Relation.Symmetric as RS
Expand Down Expand Up @@ -136,13 +134,6 @@ instance Ord a => Graph (AM.AdjacencyMap a) where
overlay = AM.overlay
connect = AM.connect

instance Graph (F.Fold a) where
type Vertex (F.Fold a) = a
empty = F.empty
vertex = F.vertex
overlay = F.overlay
connect = F.connect

instance Graph AIM.AdjacencyIntMap where
type Vertex AIM.AdjacencyIntMap = Int
empty = AIM.empty
Expand Down
Loading

0 comments on commit 1fbda0d

Please sign in to comment.