creatur-5.5.0: Framework for artificial life experiments.

Portabilityportable
Stabilityexperimental
Maintaineramy@nualeargais.ie
Safe HaskellNone

ALife.Creatur.Daemon

Description

Provides a UNIX daemon to run an experiment using the Créatúr framework.

Synopsis

Documentation

data Daemon s Source

Daemon configuration. If username is null, the daemon will run under the login name.

Constructors

Daemon 

Fields

onStartup :: s -> IO s
 
onShutdown :: s -> IO ()
 
onException :: s -> SomeException -> IO (Bool, s)
 
task :: StateT s IO Bool

The agent task.

username :: String
 
sleepTime :: Int

Number of microseconds to sleep between agent tasks.

launch :: Daemon s -> s -> IO ()Source

launch daemon state creates a daemon running under the current user's real userID, which invokes task.