Cleanup, remove DeriveGeneric language extensions

This commit is contained in:
2025-10-20 12:10:11 +01:00
parent 2056d8ba0e
commit b2fd0543dd
86 changed files with 61 additions and 263 deletions
+8 -9
View File
@@ -1,5 +1,3 @@
--{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
@@ -9,7 +7,6 @@ module Dodge.Data.Creature (
module Dodge.Data.Creature.Misc,
module Dodge.Data.Creature.State,
module Dodge.Data.Creature.Perception,
module Dodge.Data.Creature.Memory,
module Dodge.Data.Creature.Stance,
module Dodge.Data.ActionPlan,
module Dodge.Data.Item,
@@ -26,7 +23,6 @@ import Data.Aeson
import Data.Aeson.TH
import qualified Data.Map.Strict as M
import Dodge.Data.ActionPlan
import Dodge.Data.Creature.Memory
import Dodge.Data.Creature.Misc
import Dodge.Data.Creature.Perception
import Dodge.Data.Creature.Stance
@@ -39,7 +35,6 @@ import Geometry.Data
data Creature = Creature
{ _crPos :: Point3
, _crOldPos :: Point3
-- , _crZ :: Float
, _crZVel :: Float
, _crDir :: Float
, _crMvDir :: Float
@@ -60,13 +55,10 @@ data Creature = Creature
, _crFaction :: Faction
, _crGroup :: CrGroup
, _crIntention :: Intention
-- , _crMvType :: CrMvType
, _crName :: String
, _crDeathTimer :: Int
}
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
data CrHP
= HP Int
| CrIsCorpse SPic
@@ -80,12 +72,19 @@ data Intention = Intention
}
deriving (Show)
--deriving (Eq, Show, Read) --Generic, Flat)
data Memory = Memory
{ _soundsToInvestigate :: [Point2]
, _nodesSearched :: [Int]
}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
makeLenses ''Memory
makeLenses ''Creature
makeLenses ''Intention
makePrisms ''CrHP
deriveJSON defaultOptions ''Memory
concat
<$> mapM
(deriveJSON defaultOptions)