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