summaryrefslogtreecommitdiff
path: root/Biz/Id.hs
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2021-01-26 18:04:14 -0500
committerBen Sima <ben@bsima.me>2021-01-26 18:09:35 -0500
commit0ec6b06acee62b57a50ed9718b8da31fced18c4d (patch)
tree3112d481c0b0cb58eabb9f826305c867a4d4acfd /Biz/Id.hs
parent699d17db81d3508548934d39b92edb01700b3c9a (diff)
Add user subscription field
Also improved the test situation, did some refactors, and now listing the user's past analyses on their account page.
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