{- | Applies a diff to a decklist. If a card doesn't exist during a change in copies it is ignored.
| This is ignored because we don't have a concept of default category.
-}
-- applyDiff :: DeckDiff -> DeckList -> DeckList
-- applyDiff [] ys = ys
-- applyDiff (x : xs) decklist =
-- case x of
-- Add a -> applyDiff xs (insert a decklist)
-- Remove a -> delete a decklist
-- ChangeCard name newQuan newCat ->
-- let newQuantity = newQuan . quantity <$> card
-- newCategory = card <$> newCat
-- cardQuantity = fromIntegral . unrefine . runNumber . quantity
-- card = Deck.find name decklist
-- -- choice =
-- -- either
-- -- (const $ applyDiff (Remove name : xs) decklist)
-- -- (\quantity -> update (\(x', _) -> (x', PositiveNumber quantity)) name decklist)
-- -- choiceFind =
-- -- maybe
-- -- decklist
-- -- (choice . refine . fromIntegral . newQuantity . cardQuantity)
-- in choiceFind card