Cleanup, remove records, stop unecessary Aeson compile
This commit is contained in:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user