Move from store to flat

This commit is contained in:
2022-08-20 17:54:35 +01:00
parent 8571ab9254
commit ff9dbdf068
95 changed files with 793 additions and 748 deletions
+7 -8
View File
@@ -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) |]))