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.PressPlate where
import TH.Derive
import Data.Store
import Data.Binary
import Flat
import LinearHelp ()
@@ -18,7 +20,7 @@ data PressPlateEvent
= PressPlateId
| PPLevelReset
deriving (Eq, Ord, Show, Read, Generic, Flat)
instance Binary PressPlateEvent
$($(derive [d| instance Deriving (Store PressPlateEvent) |]))
data PressPlate = PressPlate
{ _ppPict :: Picture
@@ -29,7 +31,7 @@ data PressPlate = PressPlate
, _ppText :: String
}
deriving (Eq, Ord, Show, Read, Generic, Flat)
instance Binary PressPlate
$($(derive [d| instance Deriving (Store PressPlate ) |]))
makeLenses ''PressPlate
deriveJSON defaultOptions ''PressPlateEvent