mirror of
https://github.com/github/semantic.git
synced 2024-12-22 14:21:31 +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.Class as Class
|
||||
import Data.Semilattice.Lower
|
||||
import Prologue
|
||||
|
||||
-- | 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)
|
||||
|
||||
|
||||
instance Lower (Graph vertex) where
|
||||
lowerBound = Class.empty
|
||||
|
||||
instance Semigroup (Graph vertex) where
|
||||
(<>) = Class.overlay
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user