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.ForegroundShape where
|
||||
import GHC.Generics
|
||||
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
import Geometry
|
||||
import ShapePicture
|
||||
import Control.Lens
|
||||
|
||||
data ForegroundShape = ForegroundShape
|
||||
{ _fsID :: Int
|
||||
, _fsPos :: Point2
|
||||
, _fsDir :: Float
|
||||
, _fsRad :: Float -- This should probably be a bounding box
|
||||
, _fsRad :: Float -- This should probably be a bounding box
|
||||
, _fsSPic :: SPic
|
||||
}
|
||||
deriving (Eq,Ord,Show,Read,Generic)
|
||||
instance ToJSON ForegroundShape where
|
||||
toEncoding = genericToEncoding defaultOptions
|
||||
instance FromJSON ForegroundShape
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
|
||||
makeLenses ''ForegroundShape
|
||||
deriveJSON defaultOptions ''ForegroundShape
|
||||
|
||||
Reference in New Issue
Block a user