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
+20 -14
View File
@@ -1,29 +1,35 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE StrictData #-}
{- | GameRooms contain information about given positions in the world
-}
module Dodge.GameRoom
where
import LinearHelp
import Geometry
{-# LANGUAGE TemplateHaskell #-}
-- | GameRooms contain information about given positions in the world
module Dodge.GameRoom where
import Flat
import Control.Lens
import GHC.Generics
import Data.Aeson
import TH.Derive
import Data.Store
import GHC.Generics
import Geometry
import LinearHelp
import TH.Derive
data GameRoom = GameRoom
{ _grViewpoints :: [Point2]
, _grViewpointsEx :: [Point2]
, _grBound :: [Point2]
, _grDir :: Float -- ^ gives direction of room
, -- | gives direction of room
_grDir :: Float
, _grLinkDirs :: [Float]
, _grName :: String
}
deriving (Eq,Ord,Show,Read,Generic)
instance ToJSON GameRoom where
deriving (Eq, Ord, Show, Read, Generic, Flat)
instance ToJSON GameRoom where
toEncoding = genericToEncoding defaultOptions
instance FromJSON GameRoom
instance FromJSON GameRoom
makeLenses ''GameRoom
$($(derive [d| instance Deriving (Store GameRoom) |]))