Cleanup, remove records, stop unecessary Aeson compile

This commit is contained in:
2025-06-06 20:43:49 +01:00
parent d3de40d432
commit d2d4642380
22 changed files with 311 additions and 340 deletions
+3 -2
View File
@@ -4,6 +4,7 @@ module Dodge.Combine.Graph
( combinationsDotGraph
) where
import Dodge.Data.CombAmount
import Data.Bifunctor
import qualified Data.Graph.Inductive as FGL
import Data.GraphViz.Attributes.Complete
@@ -21,7 +22,7 @@ data CombClust
| JoinClust
deriving (Eq, Ord, Show, Enum, Bounded)
newtype CombNode = CombNode {_unCombNode :: Either ItemType [(ItAmount, ItemType)]}
newtype CombNode = CombNode {_unCombNode :: Either ItemType [(CombAmount, ItemType)]}
deriving (Eq, Ord, Show)
instance Labellable CombNode where
@@ -68,7 +69,7 @@ itemCombinationsEdges = concatMap (f . over _2 _itType) itemCombinations
| otherwise = (CombNode $ Right abts, CombNode $ Left bt, 0) : map g abts
where
bts = map snd abts
g (am, bt') = (CombNode $ Left bt', CombNode $ Right abts, _getItAmount am)
g (am, bt') = (CombNode $ Left bt', CombNode $ Right abts, _getCombAmount am)
combinationsGraph :: FGL.Gr CombNode CombEdge
combinationsGraph =