Skip to content
Snippets Groups Projects
Commit 79abc9ea authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

fmap is more constrained than liftM

Therefore this approach is preferable
parent 25f24e4d
No related branches found
No related tags found
1 merge request!2Stripe webhook
......@@ -82,8 +82,8 @@ instance VoucherDatabase MemoryVoucherDatabase where
return ()
redeemVoucher Memory{ paid = paid, redeemed = redeemed } voucher fingerprint = do
unpaid <- (liftM $ Set.notMember voucher) . readIORef $ paid
existingFingerprint <- (liftM $ Map.lookup voucher) . readIORef $ redeemed
unpaid <- Set.notMember voucher <$> readIORef paid
existingFingerprint <- Map.lookup voucher <$> readIORef redeemed
case (unpaid, existingFingerprint) of
(True, _) ->
return $ Left NotPaid
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment