Add Store instances
This commit is contained in:
@@ -9,6 +9,8 @@ module Dodge.Data.Block (
|
||||
module Dodge.Data.PathGraph,
|
||||
) where
|
||||
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
import Data.Binary
|
||||
import Flat
|
||||
import LinearHelp ()
|
||||
@@ -36,7 +38,6 @@ data Block = Block
|
||||
, _blObstructs :: [(Int, Int, PathEdge)]
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary Block
|
||||
|
||||
data BlockDraw
|
||||
= BlockDrawMempty
|
||||
@@ -44,15 +45,16 @@ data BlockDraw
|
||||
| BlockDraws [BlockDraw]
|
||||
| BlockDrawColHeightPoss Color Float [Point2]
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary BlockDraw
|
||||
|
||||
data BlSh
|
||||
= BlShMempty
|
||||
| BlShConst Shape
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary BlSh
|
||||
|
||||
makeLenses ''Block
|
||||
deriveJSON defaultOptions ''Block
|
||||
deriveJSON defaultOptions ''BlockDraw
|
||||
deriveJSON defaultOptions ''BlSh
|
||||
$($(derive [d| instance Deriving (Store BlSh) |]))
|
||||
$($(derive [d| instance Deriving (Store Block ) |]))
|
||||
$($(derive [d| instance Deriving (Store BlockDraw) |]))
|
||||
|
||||
Reference in New Issue
Block a user