Add Store instances
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user