summaryrefslogtreecommitdiff
path: root/Biz/Id.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Biz/Id.hs')
-rw-r--r--Biz/Id.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Biz/Id.hs b/Biz/Id.hs
index 89c74bf..9bce013 100644
--- a/Biz/Id.hs
+++ b/Biz/Id.hs
@@ -40,3 +40,10 @@ instance FromJSON (Id entity) where
instance ToJSON (Id entity) where
toJSON = toJSON <. untag
+
+-- this is just provided to satisfy Monoid, no reason to actually use it
+instance Semigroup (Id entity) where
+ a <> b = mk (Proxy :: Proxy entity) <| untag a + untag b
+
+instance Monoid (Id entity) where
+ mempty = mk (Proxy :: Proxy entity) 0