|Maintainer||David Sorokin <email@example.com>|
Tested with: GHC 7.6.3
The module defines the
Simulation monad that represents a simulation run.
- data Simulation a
- class Monad m => SimulationLift m where
- runSimulation :: Simulation a -> Specs -> IO a
- runSimulations :: Simulation a -> Specs -> Int -> [IO a]
- catchSimulation :: Simulation a -> (IOException -> Simulation a) -> Simulation a
- finallySimulation :: Simulation a -> Simulation b -> Simulation a
- throwSimulation :: IOException -> Simulation a
- simulationIndex :: Simulation Int
- simulationCount :: Simulation Int
- simulationSpecs :: Simulation Specs
A value in the
Simulation monad represents something that
doesn't change within the simulation run but may change for
This monad is ideal for representing the external parameters for the model, when the Monte-Carlo simulation is used. Also this monad is useful for defining some actions that should occur only once within the simulation run, for example, setting of the integral with help of recursive equations.
A type class to lift the simulation computations to other monads.
Lift the specified
Simulation computation to another monad.
Run the given number of simulations using the specified specs,
where each simulation is distinguished by its index
Exception handling within
A computation with finalization part like the