Module

Game.Util

Package
purescript-game
Repository
artemisSystem/purescript-game

#newRef Source

newRef :: forall s m. MonadEffect m => s -> m (Ref s)

#readRef Source

readRef :: forall s m. MonadEffect m => Ref s -> m s

#writeRef Source

writeRef :: forall s m. MonadEffect m => s -> Ref s -> m Unit

#modifyRef Source

modifyRef :: forall s m. MonadEffect m => (s -> s) -> Ref s -> m s

#modifyRef' Source

modifyRef' :: forall b s m. MonadEffect m => (s -> { state :: s, value :: b }) -> Ref s -> m b

#modifyRef_ Source

modifyRef_ :: forall s m. MonadEffect m => (s -> s) -> Ref s -> m Unit

#durationToNumber Source

durationToNumber :: forall d. Duration d => d -> Number

#nowSeconds Source

nowSeconds :: forall m. MonadEffect m => m Seconds

#iterateM Source

iterateM :: forall b a m. Monad m => (a -> m a) -> m a -> m b

#forever Source

forever :: forall b a m. Monad m => m a -> m b

#fromLeft Source

fromLeft :: forall a. Either a Void -> a

#maybeThrow Source

maybeThrow :: forall a m. MonadEffect m => String -> Maybe a -> m a

#runStateWithRef Source

runStateWithRef :: forall s r. Ref s -> (Run (effect :: EFFECT, state :: STATE s | r)) ~> (Run (effect :: EFFECT | r))

#asksAt Source

asksAt :: forall t r s e a. IsSymbol s => Cons s (READER e) t r => SProxy s -> (e -> a) -> Run r a