creatur-5.6.8: Framework for artificial life experiments.

Copyright(c) Amy de Buitléir 2012-2014
LicenseBSD-style
Maintaineramy@nualeargais.ie
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell98

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 s
 
task :: StateT s IO ()

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.