module Reactive.Threepenny.Monads where

import Control.Monad.Trans.RWS.Lazy
import Reactive.Threepenny.Types

{-----------------------------------------------------------------------------
    EvalP - evaluate pulses
------------------------------------------------------------------------------}
runEvalP :: Values -> EvalP a -> IO (a, Values)
runEvalP :: forall a. Values -> EvalP a -> IO (a, Values)
runEvalP Values
pulses EvalP a
m = do
    (a
a, Values
s, ()
_) <- EvalP a -> () -> Values -> IO (a, Values, ())
forall r w s (m :: * -> *) a.
RWST r w s m a -> r -> s -> m (a, s, w)
runRWST EvalP a
m () Values
pulses
    (a, Values) -> IO (a, Values)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (a
a, Values
s)