Move from store to flat
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
module Dodge.Data.Creature.Stance where
|
||||
|
||||
import Flat
|
||||
import LinearHelp
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
@@ -16,7 +19,7 @@ data Stance = Stance
|
||||
, _posture :: Posture
|
||||
, _strideLength :: Int
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data Carriage
|
||||
= Walking
|
||||
@@ -27,19 +30,19 @@ data Carriage
|
||||
| Floating
|
||||
| Flying
|
||||
| Boosting Point2
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data FootForward
|
||||
= LeftForward
|
||||
| RightForward
|
||||
| WasLeftForward
|
||||
| WasRightForward
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data Posture
|
||||
= Aiming
|
||||
| AtEase
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
makeLenses ''Stance
|
||||
makeLenses ''Carriage
|
||||
@@ -48,7 +51,3 @@ deriveJSON defaultOptions ''Stance
|
||||
deriveJSON defaultOptions ''Carriage
|
||||
deriveJSON defaultOptions ''FootForward
|
||||
deriveJSON defaultOptions ''Posture
|
||||
$($(derive [d| instance Deriving (Store Stance) |]))
|
||||
$($(derive [d| instance Deriving (Store Carriage) |]))
|
||||
$($(derive [d| instance Deriving (Store FootForward) |]))
|
||||
$($(derive [d| instance Deriving (Store Posture) |]))
|
||||
|
||||
Reference in New Issue
Block a user