Move toward diagnosing state update leak
This commit is contained in:
@@ -2,14 +2,14 @@ module Dodge.Creature.Update
|
||||
where
|
||||
import Dodge.Data
|
||||
|
||||
import System.Random
|
||||
--import System.Random
|
||||
import Data.Monoid
|
||||
-- combinators for helping with dealing with creature update
|
||||
|
||||
type CRUpdate = World -> (World -> World,StdGen) -> Creature -> ((World -> World,StdGen), Maybe Creature)
|
||||
|
||||
unrandUpdate
|
||||
:: (Creature -> World -> World)
|
||||
-> (Creature -> Maybe Creature)
|
||||
-> CRUpdate
|
||||
{-# INLINE unrandUpdate #-}
|
||||
unrandUpdate h cF _ (f,g) cr = ( ( h cr . f , g) , cF cr )
|
||||
unrandUpdate h cF cr _ = ( Endo (h cr) , cF cr )
|
||||
|
||||
Reference in New Issue
Block a user