Add Store instances
This commit is contained in:
@@ -8,6 +8,8 @@ module Dodge.Data.Wall (
|
||||
module Dodge.Data.Material,
|
||||
) where
|
||||
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
import Data.Binary
|
||||
import Flat
|
||||
import LinearHelp ()
|
||||
@@ -38,7 +40,6 @@ data Wall = Wall
|
||||
, _wlMaterial :: Material
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary Wall
|
||||
|
||||
data Opacity
|
||||
= SeeThrough
|
||||
@@ -46,11 +47,10 @@ data Opacity
|
||||
| DrawnWall {_opDraw :: WallDraw} -- Wall -> SPic
|
||||
| Opaque
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary Opacity
|
||||
|
||||
data WallDraw = DrawForceField
|
||||
| HackWallDraw
|
||||
deriving (Eq, Ord, Show, Read, Enum, Bounded, Generic, Flat)
|
||||
instance Binary WallDraw
|
||||
|
||||
data WallStructure
|
||||
= StandaloneWall
|
||||
@@ -61,7 +61,6 @@ data WallStructure
|
||||
{ _wlStCreature :: Int
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary WallStructure
|
||||
|
||||
makeLenses ''Wall
|
||||
makeLenses ''Opacity
|
||||
@@ -70,3 +69,7 @@ deriveJSON defaultOptions ''Wall
|
||||
deriveJSON defaultOptions ''Opacity
|
||||
deriveJSON defaultOptions ''WallDraw
|
||||
deriveJSON defaultOptions ''WallStructure
|
||||
$($(derive [d| instance Deriving (Store Wall ) |]))
|
||||
$($(derive [d| instance Deriving (Store Opacity) |]))
|
||||
$($(derive [d| instance Deriving (Store WallDraw ) |]))
|
||||
$($(derive [d| instance Deriving (Store WallStructure) |]))
|
||||
|
||||
Reference in New Issue
Block a user