Add Store instances
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
|
||||
module Dodge.Data.PosEvent where
|
||||
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
import Data.Binary
|
||||
import Flat
|
||||
import LinearHelp ()
|
||||
@@ -14,8 +16,9 @@ import Data.Aeson.TH
|
||||
import Geometry.Data
|
||||
|
||||
data PosEventType = SparkSpawner
|
||||
| HackSparkSpawner
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary PosEventType
|
||||
$($(derive [d| instance Deriving (Store PosEventType ) |]))
|
||||
|
||||
data PosEvent = PosEvent
|
||||
{ _pvType :: PosEventType
|
||||
@@ -23,7 +26,7 @@ data PosEvent = PosEvent
|
||||
, _pvPos :: Point2
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary PosEvent
|
||||
$($(derive [d| instance Deriving (Store PosEvent ) |]))
|
||||
|
||||
makeLenses ''PosEvent
|
||||
deriveJSON defaultOptions ''PosEventType
|
||||
|
||||
Reference in New Issue
Block a user