Factor winningBids for easier testing.
[?]
Mar 5, 2016, 3:33 AM
GLFF5ZDKWI7WKPZSAEE3IUM27LL6DFOPIL4VPODXYXV3BCSCJ6GQCDependencies
- [2]
NEDDHXUKReformat via stylish-haskell - [3]
UUR6SMCAAdd start of specs for auctions. - [4]
WO2MINIFAuctions now compile! - [5]
TLQ72DSJLenses, sqlite-simple - [6]
KEP5WUFJConvert project to stack-based build. - [7]
75N3UJ4JMore progression toward lenses. - [8]
ZP62WC47Begin conversion to build with stack. - [9]
IZEVQF62Work in progress replacing sqlite with postgres. - [10]
M4KM76DGMerge branch 'stackify' - [11]
F2XLL7XWRemove Ord Bid & sort in favor of sortBy - [12]
7HPY3QPFFix linting errors. (yay hlint!) - [*]
LAROLAYUWIP
Change contents
- replacement in lib/Aftok/Auction.hs at line 44
winningBids auction bids =winningBids auction = winningBids' (auction ^. raiseAmount)winningBids' :: Satoshi -> [Bid] -> [Bid]winningBids' raiseAmount' bids = - replacement in lib/Aftok/Auction.hs at line 51
| total + (x ^. bidAmount) < (auction ^. raiseAmount) =| total + (x ^. bidAmount) < raiseAmount' = - replacement in lib/Aftok/Auction.hs at line 55
| total < (auction ^. raiseAmount) =let remainder = (auction ^. raiseAmount) - total| total < raiseAmount' =let remainder = raiseAmount' - total - replacement in test/Aftok/AuctionSpec.hs at line 16
spec =spec = do - edit in test/Aftok/AuctionSpec.hs at line 26
describe "winning bids" $it "determines a sufficient number of winners to fulfill the raise amount" $True `shouldBe` True