Attempt to make CWorld correct instance of Store

This commit is contained in:
2022-08-20 15:53:37 +01:00
parent e1a555ea02
commit 8571ab9254
89 changed files with 570 additions and 19 deletions
+17
View File
@@ -1,5 +1,6 @@
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Dodge.Data.Creature (
module Dodge.Data.Creature,
@@ -14,6 +15,9 @@ module Dodge.Data.Creature (
module Dodge.Data.Hammer,
) where
import LinearHelp
import TH.Derive
import Data.Store
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
@@ -73,6 +77,7 @@ data Creature = Creature
deriving (Eq, Show, Read)
data CreatureCorpse = MakeDefaultCorpse
| HackDefaultCorpse
deriving (Eq, Ord, Show, Read)
data Intention = Intention
@@ -90,3 +95,15 @@ makeLenses ''Intention
deriveJSON defaultOptions ''Creature
deriveJSON defaultOptions ''CreatureCorpse
deriveJSON defaultOptions ''Intention
{- FOURMOLU_DISABLE -}
$($(derive [d|
instance Deriving (Store Intention)
|]))
$($(derive [d|
instance Deriving (Store CreatureCorpse)
|]))
$($(derive [d|
instance Deriving (Store Creature)
|]))
{- FOURMOLU_ENABLE -}