From ce651eb6fd1807aed690ae22c8058b4e3a2eb399 Mon Sep 17 00:00:00 2001
From: Ramakrishnan Muthukrishnan <ram@leastauthority.com>
Date: Wed, 23 Oct 2019 16:00:37 +0530
Subject: [PATCH] Make insertFn pointfree

---
 src/PaymentServer/Persistence.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PaymentServer/Persistence.hs b/src/PaymentServer/Persistence.hs
index 4363000..57ec04d 100644
--- a/src/PaymentServer/Persistence.hs
+++ b/src/PaymentServer/Persistence.hs
@@ -98,7 +98,7 @@ instance VoucherDatabase VoucherDatabaseState where
   redeemVoucher MemoryDB{ paid = paid, redeemed = redeemed } voucher fingerprint = do
     unpaid <- Set.notMember voucher <$> readIORef paid
     existingFingerprint <- Map.lookup voucher <$> readIORef redeemed
-    let insertFn voucher fingerprint = modifyIORef redeemed (Map.insert voucher fingerprint)
+    let insertFn = (modifyIORef redeemed .) . Map.insert
     redeemVoucherHelper (unpaid, existingFingerprint) voucher fingerprint insertFn
 
   redeemVoucher SQLiteDB { conn = conn } voucher fingerprint = do
-- 
GitLab