Fix space leak (non-strict data fields)

This commit is contained in:
2022-08-24 10:08:55 +01:00
parent e7e20277e4
commit 13b07b53ce
3 changed files with 20 additions and 16 deletions
+6 -2
View File
@@ -187,8 +187,12 @@ defaultImpulsive ::
Creature ->
World ->
World
defaultImpulsive fs cr = updateRandGen -- . stateUpdate (const id) cr
--fmap (fmap updateRandGen) . stateUpdate . impulsiveAIBefore . chainCreatureUpdates
defaultImpulsive
--xs cr = id
-- updateRandGen -- . stateUpdate (const id) cr
= fmap (fmap updateRandGen) . stateUpdate . impulsiveAIBefore . chainCreatureUpdates
--xs cr = updateRandGen . stateUpdate (const id) cr
--xs cr = stateUpdate (const id) cr
where
updateRandGen w =
let (_, g) = randomR (0, 1 :: Int) (_randGen w)