Refactor, try to limit dependencies
This commit is contained in:
@@ -1,19 +1,20 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Dodge.Data.LinearShockwave where
|
||||
import GHC.Generics
|
||||
import Data.Aeson
|
||||
import Geometry.Data
|
||||
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
import Geometry.Data
|
||||
|
||||
data LinearShockwave = LinearShockwave
|
||||
{ _lwPos :: Point2
|
||||
, _lwID :: Int
|
||||
, _lwPoints :: [(Point2,Point2)]
|
||||
, _lwPoints :: [(Point2, Point2)]
|
||||
, _lwTimer :: Int
|
||||
}
|
||||
deriving (Eq,Ord,Show,Read,Generic)
|
||||
instance ToJSON LinearShockwave where
|
||||
toEncoding = genericToEncoding defaultOptions
|
||||
instance FromJSON LinearShockwave
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
|
||||
makeLenses ''LinearShockwave
|
||||
deriveJSON defaultOptions ''LinearShockwave
|
||||
|
||||
Reference in New Issue
Block a user