From 869b054f2b650da23708eefb6cc58e3fb5c1b51d Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 11 May 2018 12:11:03 -0400 Subject: [PATCH] Define a Monoid instance. --- src/Data/Graph.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Data/Graph.hs b/src/Data/Graph.hs index efa46a48c..ca1dd6bee 100644 --- a/src/Data/Graph.hs +++ b/src/Data/Graph.hs @@ -21,3 +21,7 @@ simplify (Graph graph) = Graph (G.simplify graph) instance Semigroup (Graph v) where (<>) = Class.overlay + +instance Monoid (Graph v) where + mempty = Class.empty + mappend = (<>)