Add Store instances
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
|
||||
module Dodge.Data.Prop where
|
||||
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
import Data.Binary
|
||||
import Flat
|
||||
import Color
|
||||
@@ -41,7 +43,6 @@ data Prop
|
||||
, _prToggle :: Bool
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary Prop
|
||||
|
||||
data PropDraw
|
||||
= PropDrawSPic SPic
|
||||
@@ -54,7 +55,6 @@ data PropDraw
|
||||
| PropDrawToggle PropDraw
|
||||
| PropDrawGib Float
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary PropDraw
|
||||
|
||||
data PropUpdate
|
||||
= PropUpdateAnd PropUpdate PropUpdate
|
||||
@@ -69,17 +69,19 @@ data PropUpdate
|
||||
| PropUpdateWhen WdBl PropUpdate
|
||||
| PropUpdateIf WdBl PropUpdate PropUpdate
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary PropUpdate
|
||||
|
||||
data PrWdLsLs
|
||||
= PrWdLsId
|
||||
| PrWdLsSetPosition WdP2f Point3
|
||||
| PrWdLsSetColor Point3
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary PrWdLsLs
|
||||
|
||||
makeLenses ''Prop
|
||||
deriveJSON defaultOptions ''PropDraw
|
||||
deriveJSON defaultOptions ''PropUpdate
|
||||
deriveJSON defaultOptions ''PrWdLsLs
|
||||
deriveJSON defaultOptions ''Prop
|
||||
$($(derive [d| instance Deriving (Store Prop) |]))
|
||||
$($(derive [d| instance Deriving (Store PropDraw) |]))
|
||||
$($(derive [d| instance Deriving (Store PropUpdate) |]))
|
||||
$($(derive [d| instance Deriving (Store PrWdLsLs) |]))
|
||||
|
||||
Reference in New Issue
Block a user