Move from store to flat

This commit is contained in:
2022-08-20 17:54:35 +01:00
parent 8571ab9254
commit ff9dbdf068
95 changed files with 793 additions and 748 deletions
+7 -8
View File
@@ -1,8 +1,11 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.Prop where
import Flat
import Color
import Control.Lens
import Data.Aeson
@@ -38,7 +41,7 @@ data Prop
, _prRot :: Float
, _prToggle :: Bool
}
deriving (Eq, Ord, Show, Read)
deriving (Eq, Ord, Show, Read, Generic, Flat)
data PropDraw
= PropDrawSPic SPic
@@ -50,7 +53,7 @@ data PropDraw
| PropLampCover Float
| PropDrawToggle PropDraw
| PropDrawGib Float
deriving (Eq, Ord, Show, Read)
deriving (Eq, Ord, Show, Read, Generic, Flat)
data PropUpdate
= PropUpdateAnd PropUpdate PropUpdate
@@ -64,20 +67,16 @@ data PropUpdate
| PropUpdatePosition WdP2f
| PropUpdateWhen WdBl PropUpdate
| PropUpdateIf WdBl PropUpdate PropUpdate
deriving (Eq, Ord, Show, Read)
deriving (Eq, Ord, Show, Read, Generic, Flat)
data PrWdLsLs
= PrWdLsId
| PrWdLsSetPosition WdP2f Point3
| PrWdLsSetColor Point3
deriving (Eq, Ord, Show, Read)
deriving (Eq, Ord, Show, Read, Generic, Flat)
makeLenses ''Prop
deriveJSON defaultOptions ''PropDraw
deriveJSON defaultOptions ''PropUpdate
deriveJSON defaultOptions ''PrWdLsLs
deriveJSON defaultOptions ''Prop
$($(derive [d| instance Deriving (Store PropDraw) |]))
$($(derive [d| instance Deriving (Store PropUpdate) |]))
$($(derive [d| instance Deriving (Store PrWdLsLs) |]))
$($(derive [d| instance Deriving (Store Prop) |]))