Add Store instances
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
|
||||
module Dodge.Data.Creature.Stance where
|
||||
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
import Data.Binary
|
||||
import Flat
|
||||
import LinearHelp ()
|
||||
@@ -19,7 +21,6 @@ data Stance = Stance
|
||||
, _strideLength :: Int
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary Stance
|
||||
|
||||
data Carriage
|
||||
= Walking
|
||||
@@ -31,7 +32,6 @@ data Carriage
|
||||
| Flying
|
||||
| Boosting Point2
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary Carriage
|
||||
|
||||
data FootForward
|
||||
= LeftForward
|
||||
@@ -39,13 +39,12 @@ data FootForward
|
||||
| WasLeftForward
|
||||
| WasRightForward
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary FootForward
|
||||
|
||||
data Posture
|
||||
= Aiming
|
||||
| AtEase
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary Posture
|
||||
$($(derive [d| instance Deriving (Store Posture) |]))
|
||||
|
||||
makeLenses ''Stance
|
||||
makeLenses ''Carriage
|
||||
@@ -54,3 +53,6 @@ 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) |]))
|
||||
|
||||
Reference in New Issue
Block a user