mirror of
https://github.com/github/semantic.git
synced 2025-01-09 00:56:32 +03:00
Define a Lower instance for Graph.
This commit is contained in:
parent
84c69b038d
commit
dbf4b59ba2
@ -9,6 +9,7 @@ module Data.Graph
|
|||||||
|
|
||||||
import qualified Algebra.Graph as G
|
import qualified Algebra.Graph as G
|
||||||
import qualified Algebra.Graph.Class as Class
|
import qualified Algebra.Graph.Class as Class
|
||||||
|
import Data.Semilattice.Lower
|
||||||
import Prologue
|
import Prologue
|
||||||
|
|
||||||
-- | An algebraic graph with 'Ord', 'Semigroup', and 'Monoid' instances.
|
-- | An algebraic graph with 'Ord', 'Semigroup', and 'Monoid' instances.
|
||||||
@ -20,6 +21,9 @@ simplify :: Ord vertex => Graph vertex -> Graph vertex
|
|||||||
simplify (Graph graph) = Graph (G.simplify graph)
|
simplify (Graph graph) = Graph (G.simplify graph)
|
||||||
|
|
||||||
|
|
||||||
|
instance Lower (Graph vertex) where
|
||||||
|
lowerBound = Class.empty
|
||||||
|
|
||||||
instance Semigroup (Graph vertex) where
|
instance Semigroup (Graph vertex) where
|
||||||
(<>) = Class.overlay
|
(<>) = Class.overlay
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user