From 0ec6b06acee62b57a50ed9718b8da31fced18c4d Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Tue, 26 Jan 2021 18:04:14 -0500 Subject: Add user subscription field Also improved the test situation, did some refactors, and now listing the user's past analyses on their account page. --- Biz/Id.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Biz/Id.hs') 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 -- cgit v1.2.3