creatur-5.9.10: Framework for artificial life experiments.

Copyright(c) Amy de Buitléir 2012-2015
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 Job s Source

The work to be performed by a daemon.

Constructors

Job 

Fields

onStartup :: s -> IO s

Operations to perform on startup.

onShutdown :: s -> IO ()

Operations to perform on shutdown.

onException :: s -> SomeException -> IO s

Operations to perform if an exception occurs.

task :: StateT s IO ()

Operations to perform repeatedly while running.

sleepTime :: Int

Number of microseconds to sleep between invocations of task.

data CreaturDaemon p s Source

Constructors

CreaturDaemon 

Fields

daemon :: CreateDaemon p
 
job :: Job s
 

simpleDaemon :: Job s -> s -> CreateDaemon () Source

Creates a simple daemon to run a job. The daemon will run under the login name.

launch :: CreaturDaemon p s -> IO () Source

launch daemon state creates a daemon, which invokes daemon. *Note:* If user (in daemon) is Just "", the daemon will run under the login name. If user is Nothing, the daemon will run under the name of the executable file containing the daemon.

launchInteractive :: Job s -> s -> IO () Source