Refactor, try to limit dependencies
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
@@ -6,8 +5,8 @@ module Dodge.Data.ArcStep where
|
||||
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
import Dodge.Data.CrWlID
|
||||
import GHC.Generics
|
||||
import Geometry.Data
|
||||
|
||||
data ArcStep = ArcStep
|
||||
@@ -15,21 +14,13 @@ data ArcStep = ArcStep
|
||||
, _asDir :: Float
|
||||
, _asObject :: CrWlID --Maybe (Either Creature Wall)
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read, Generic)
|
||||
|
||||
instance ToJSON ArcStep where
|
||||
toEncoding = genericToEncoding defaultOptions
|
||||
|
||||
instance FromJSON ArcStep
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
|
||||
data NextArcStep
|
||||
= EndArc
|
||||
| DefaultArcStep
|
||||
deriving (Eq, Ord, Show, Read, Generic)
|
||||
|
||||
instance ToJSON NextArcStep where
|
||||
toEncoding = genericToEncoding defaultOptions
|
||||
|
||||
instance FromJSON NextArcStep
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
|
||||
makeLenses ''ArcStep
|
||||
deriveJSON defaultOptions ''ArcStep
|
||||
deriveJSON defaultOptions ''NextArcStep
|
||||
|
||||
Reference in New Issue
Block a user