Cleanup, remove records, stop unecessary Aeson compile
This commit is contained in:
@@ -3,6 +3,7 @@ module Dodge.Combine (
|
||||
combineList,
|
||||
) where
|
||||
|
||||
import Dodge.Data.CombAmount
|
||||
import Dodge.Item.InvSize
|
||||
import Dodge.Item.Grammar
|
||||
import Data.Bifunctor
|
||||
@@ -40,7 +41,7 @@ flatLookupItems =
|
||||
flip multiLookupTrieI combinationsTrie . sortOn fst . groupSplitItemAmounts
|
||||
. invertInventoryToMap
|
||||
|
||||
combinationsTrie :: Trie (ItAmount, ItemType) Item
|
||||
combinationsTrie :: Trie (CombAmount, ItemType) Item
|
||||
{-# INLINE combinationsTrie #-}
|
||||
combinationsTrie =
|
||||
foldl'
|
||||
@@ -48,7 +49,7 @@ combinationsTrie =
|
||||
emptyTrie
|
||||
itemCombinations
|
||||
|
||||
groupSplitItemAmounts :: M.Map ItemType [Int] -> [((ItAmount, ItemType), [Int])]
|
||||
groupSplitItemAmounts :: M.Map ItemType [Int] -> [((CombAmount, ItemType), [Int])]
|
||||
groupSplitItemAmounts = M.foldMapWithKey f
|
||||
where
|
||||
f ibt is = [((fromIntegral i, ibt), take i is) | i <- [1 .. length is]]
|
||||
|
||||
Reference in New Issue
Block a user