Add Store instances
This commit is contained in:
@@ -10,6 +10,8 @@ module Dodge.Data.Door (
|
||||
module Dodge.Data.WorldEffect,
|
||||
) where
|
||||
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
import Data.Binary
|
||||
import Flat
|
||||
import LinearHelp ()
|
||||
@@ -24,14 +26,14 @@ import Geometry.Data
|
||||
|
||||
data DoorStatus = DoorOpen | DoorClosed | DoorHalfway | DoorInt Int
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary DoorStatus
|
||||
$($(derive [d| instance Deriving (Store DoorStatus ) |]))
|
||||
|
||||
data PushSource
|
||||
= PushesItself
|
||||
| PushedBy Int
|
||||
| NotPushed
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary PushSource
|
||||
$($(derive [d| instance Deriving (Store PushSource) |]))
|
||||
|
||||
data Door = Door
|
||||
{ _drID :: Int
|
||||
@@ -52,7 +54,7 @@ data Door = Door
|
||||
, _drObstacleType :: EdgeObstacle
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary Door
|
||||
$($(derive [d| instance Deriving (Store Door ) |]))
|
||||
|
||||
makeLenses ''Door
|
||||
deriveJSON defaultOptions ''DoorStatus
|
||||
|
||||
Reference in New Issue
Block a user