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

a couple more comments

parent 76e7cd66
No related branches found
No related tags found
1 merge request!2Stripe webhook
......@@ -64,11 +64,15 @@ class VoucherDatabase d where
-> IO (Either RedeemError ()) -- ^ Left indicating the redemption is not allowed or Right indicating it is.
-- | MemoryVoucherDatabase is a voucher database that only persists state
-- in-memory. The state does not outlive the process which creates it. This
-- is primarily useful for testing.
-- in-memory. The state does not outlive the process which creates it (nor
-- even the MemoryVoucherDatabase value). This is primarily useful for
-- testing.
data MemoryVoucherDatabase =
Memory
{ paid :: IORef (Set.Set Voucher)
Memory {
-- | A set of vouchers which have been paid for.
paid :: IORef (Set.Set Voucher)
-- | A mapping from redeemed vouchers to fingerprints associated with the
-- redemption.
, redeemed :: IORef (Map.Map Voucher Fingerprint)
}
......
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