Cleanup, trying to diagnose space leak in crit update

This commit is contained in:
2021-12-09 22:12:44 +00:00
parent bd94044445
commit 3c35a04531
23 changed files with 203 additions and 178 deletions
+10 -5
View File
@@ -1,7 +1,7 @@
module Dodge.Creature.Impulse
( impulsiveAIR
)
where
, impulsiveAI
) where
import Dodge.Data
import Dodge.Creature.Vocalization
import Dodge.Creature.Impulse.Movement
@@ -13,15 +13,20 @@ import qualified Data.IntMap.Strict as IM
import System.Random
import Control.Lens
import Control.Monad.Reader
import Data.Monoid
import Data.Bifunctor
impulsiveAIR
:: (Creature -> Reader World Creature)
-> Creature
-> World
-> (Endo World , Maybe Creature)
impulsiveAIR impf cr w = bimap Endo Just $ followImpulses w . ($ w) . runReader $ impf cr
-> (World -> World , Maybe Creature)
impulsiveAIR impf cr w = bimap id Just $ followImpulses w . ($ w) . runReader $ impf cr
impulsiveAI :: (World -> Creature -> Creature)
-> Creature
-> World
-> (World -> World , Maybe Creature)
impulsiveAI impf cr w = bimap id Just $ followImpulses w $ impf w cr
followImpulses
:: World