Add Store instances

This commit is contained in:
2022-08-21 12:21:05 +01:00
parent 1ce7d4a72d
commit dd62e30026
92 changed files with 465 additions and 255 deletions
+5 -2
View File
@@ -5,6 +5,8 @@
module Dodge.Data.Corpse where
import TH.Derive
import Data.Store
import Data.Binary
import Flat
import LinearHelp ()
@@ -15,8 +17,9 @@ import Geometry.Data
import ShapePicture.Data
data CorpseResurrection = NoResurrection
| HackCorpseResurrection
deriving (Eq, Ord, Show, Read, Generic, Flat)
instance Binary CorpseResurrection
$($(derive [d| instance Deriving (Store CorpseResurrection ) |]))
data Corpse = Corpse
{ _cpID :: Int
@@ -26,7 +29,7 @@ data Corpse = Corpse
, _cpRes :: CorpseResurrection
}
deriving (Eq, Ord, Show, Read, Generic, Flat)
instance Binary Corpse
$($(derive [d| instance Deriving (Store Corpse ) |]))
makeLenses ''Corpse
deriveJSON defaultOptions ''CorpseResurrection