JKMHA2QGDSVHD4DKDYQUYNJJ3LUQCOPOWEC3543BDWDXLYIBBZXQC TLQ72DSJD7GGPWN6HGBHAVPBRQFKEQ6KSK43U7JWWID4ZWAF47JAC EMVTF2IWNQGRL44FC4JNG5FYYQTZSFPNM6SOM7IAEH6T7PPK2NVAC 64C6AWH66FDKU6UE6Z6JPX2J2GBM2JOPTH2GL6LHKAIUBGNGDZ5AC 75N3UJ4JK56KXF56GASGPAWLFYGJDETVJNYTF4KXFCQM767JUU5AC LUM4VQJIHJKQWWD5NVWTVSNPKQTMGQQICTFOTM6W4BMME2G3G5RQC MWUPXTBF2LATVOJLJTXSDFB3OMFGMXDNETWJA3JHUOUBTUJ7WJAAC LAROLAYUGJ4Q5AEFV5EJMIA2ZKBNCBWHHHPCJ3CKCNIUIYUKRFVQC WO2MINIF4TXOHWSE7JWXRZYN64XRVLYIRFMF4SMPSOXKA2V77KMQC newtype PBid = PBid BidmakePrisms ''PBidinstance FromRow PBid wherefromRow =let bidParser = Bid <$> fmap UserId field <*> fmap Seconds field <*> fmap BTC field <*> fieldin fmap PBid bidParsernewtype PSeconds = PSeconds Secondsinstance ToField PSeconds wheretoField (PSeconds (Seconds i)) = toField inewtype PUserId = PUserId UserIdinstance ToField PUserId wheretoField (PUserId (UserId i)) = toField inewtype PAuctionId = PAuctionId AuctionIdinstance ToField PAuctionId wheretoField (PAuctionId (AuctionId i)) = toField inewtype PBTC = PBTC BTCinstance ToField PBTC wheretoField (PBTC (BTC i)) = toField i
readBids' :: AuctionId -> ReaderT Connection IO [(UTCTime, Bid)]readBids' = undefined
readBids' :: AuctionId -> ReaderT Connection IO [Bid]readBids' aucId = doconn <- askrows <- lift $ query conn"SELECT user_id, bid_seconds, bid_amount, bid_time FROM bids WHERE auction_id = ?"(Only $ PAuctionId aucId)lift . return $ fmap (^. _PBid) rows
makeLenses ''User