Add Store instances

This commit is contained in:
2022-08-21 12:21:05 +01:00
parent 1ce7d4a72d
commit dd62e30026
92 changed files with 465 additions and 255 deletions
+6 -4
View File
@@ -5,6 +5,8 @@
module Dodge.Data.Beam where
import TH.Derive
import Data.Store
import Data.Binary
import Flat
import Color
@@ -31,13 +33,11 @@ data Beam = Beam
, _bmType :: BeamType
}
deriving (Eq, Ord, Show, Read, Generic, Flat)
instance Binary Beam
data BeamDraw
= BasicBeamDraw
| BeamDrawColor Color
deriving (Eq, Ord, Show, Read, Generic, Flat)
instance Binary BeamDraw
data BeamCombineType
= FlameBeamCombine
@@ -46,7 +46,6 @@ data BeamCombineType
| SplitBeamCombine
| NoBeamCombine
deriving (Eq, Ord, Show, Read, Generic, Flat)
instance Binary BeamCombineType
data BeamType
= BeamCombine
@@ -54,7 +53,6 @@ data BeamType
}
| BeamSimple
deriving (Eq, Ord, Show, Read, Generic, Flat)
instance Binary BeamType
makeLenses ''BeamType
makeLenses ''Beam
@@ -62,3 +60,7 @@ deriveJSON defaultOptions ''BeamType
deriveJSON defaultOptions ''Beam
deriveJSON defaultOptions ''BeamDraw
deriveJSON defaultOptions ''BeamCombineType
$($(derive [d| instance Deriving (Store Beam ) |]))
$($(derive [d| instance Deriving (Store BeamDraw) |]))
$($(derive [d| instance Deriving (Store BeamCombineType) |]))
$($(derive [d| instance Deriving (Store BeamType) |]))