1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 22:31:36 +03:00

Add a function to simplify graphs.

This commit is contained in:
Rob Rix 2018-05-11 12:10:27 -04:00
parent ee8f2d1611
commit 613a812cf0

View File

@ -4,6 +4,7 @@ module Data.Graph
, Class.overlay
, Class.connect
, Class.vertex
, simplify
) where
import qualified Algebra.Graph as G
@ -11,3 +12,7 @@ import qualified Algebra.Graph.Class as Class
newtype Graph vertex = Graph (G.Graph vertex)
deriving (Eq, Foldable, Functor, Class.Graph, Show, Class.ToGraph, Traversable)
simplify :: Ord v => Graph v -> Graph v
simplify (Graph graph) = Graph (G.simplify graph)