Move from store to flat

This commit is contained in:
2022-08-20 17:54:35 +01:00
parent 8571ab9254
commit ff9dbdf068
95 changed files with 793 additions and 748 deletions
+6 -8
View File
@@ -1,20 +1,20 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.Corpse where
import LinearHelp
import Flat
import LinearHelp ()
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
import Geometry.Data
import ShapePicture.Data
import TH.Derive
import Data.Store
data CorpseResurrection = NoResurrection
| HackCorpseRez
deriving (Eq, Ord, Show, Read)
deriving (Eq, Ord, Show, Read, Generic, Flat)
data Corpse = Corpse
{ _cpID :: Int
@@ -23,10 +23,8 @@ data Corpse = Corpse
, _cpSPic :: SPic
, _cpRes :: CorpseResurrection
}
deriving (Eq, Ord, Show, Read)
deriving (Eq, Ord, Show, Read, Generic, Flat)
makeLenses ''Corpse
deriveJSON defaultOptions ''CorpseResurrection
deriveJSON defaultOptions ''Corpse
$($(derive [d| instance Deriving (Store CorpseResurrection) |]))
$($(derive [d| instance Deriving (Store Corpse) |]))