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
+4 -2
View File
@@ -5,6 +5,8 @@
module Dodge.Data.Shockwave where
import TH.Derive
import Data.Store
import Data.Binary
import Flat
import Color
@@ -15,7 +17,7 @@ import Geometry.Data
data ShockwaveDirection = OutwardShockwave | InwardShockwave
deriving (Eq, Ord, Show, Read, Generic, Flat)
instance Binary ShockwaveDirection
$($(derive [d| instance Deriving (Store ShockwaveDirection ) |]))
data Shockwave = Shockwave
{ _swColor :: Color
@@ -29,7 +31,7 @@ data Shockwave = Shockwave
, _swTimer :: Int
}
deriving (Eq, Ord, Show, Read, Generic, Flat)
instance Binary Shockwave
$($(derive [d| instance Deriving (Store Shockwave ) |]))
makeLenses ''Shockwave
deriveJSON defaultOptions ''ShockwaveDirection