diff options
Diffstat (limited to 'Biz/Id.hs')
-rw-r--r-- | Biz/Id.hs | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 |