Attempt to make CWorld correct instance of Store

This commit is contained in:
2022-08-20 15:53:37 +01:00
parent e1a555ea02
commit 8571ab9254
89 changed files with 570 additions and 19 deletions
+8
View File
@@ -6,12 +6,15 @@ module Dodge.Data.Wall (
module Dodge.Data.Material,
) where
import LinearHelp
import Color
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
import Dodge.Data.Material
import Geometry
import TH.Derive
import Data.Store
data Wall = Wall
{ _wlLine :: (Point2, Point2)
@@ -42,6 +45,7 @@ data Opacity
deriving (Eq, Ord, Show, Read)
data WallDraw = DrawForceField
| HackWallDraw
deriving (Eq, Ord, Show, Read, Enum, Bounded)
data WallStructure
@@ -61,3 +65,7 @@ deriveJSON defaultOptions ''Wall
deriveJSON defaultOptions ''Opacity
deriveJSON defaultOptions ''WallDraw
deriveJSON defaultOptions ''WallStructure
$($(derive [d| instance Deriving (Store Wall) |]))
$($(derive [d| instance Deriving (Store Opacity) |]))
$($(derive [d| instance Deriving (Store WallDraw) |]))
$($(derive [d| instance Deriving (Store WallStructure) |]))