Move from store to flat
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Dodge.Data.PosEvent where
|
||||
|
||||
import LinearHelp
|
||||
import Flat
|
||||
import LinearHelp ()
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
@@ -12,18 +15,15 @@ import TH.Derive
|
||||
import Data.Store
|
||||
|
||||
data PosEventType = SparkSpawner
|
||||
| HackPosEventType
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data PosEvent = PosEvent
|
||||
{ _pvType :: PosEventType
|
||||
, _pvTimer :: Int
|
||||
, _pvPos :: Point2
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
makeLenses ''PosEvent
|
||||
deriveJSON defaultOptions ''PosEventType
|
||||
deriveJSON defaultOptions ''PosEvent
|
||||
$($(derive [d| instance Deriving (Store PosEventType) |]))
|
||||
$($(derive [d| instance Deriving (Store PosEvent) |]))
|
||||
|
||||
Reference in New Issue
Block a user