creatur-5.9.30: Framework for artificial life experiments.
Copyright(c) 2012-2021 Amy de Buitléir
LicenseBSD-style
Maintaineramy@nualeargais.ie
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

ALife.Creatur.Persistent

Description

A state which persists between runs.

Synopsis

Documentation

data Persistent a Source #

Instances

Instances details
Checklist PersistentChecklist Source # 
Instance details

Defined in ALife.Creatur.Checklist

Clock PersistentCounter Source # 
Instance details

Defined in ALife.Creatur.Counter

Counter PersistentCounter Source # 
Instance details

Defined in ALife.Creatur.Counter

Eq a => Eq (Persistent a) Source # 
Instance details

Defined in ALife.Creatur.Persistent

Methods

(==) :: Persistent a -> Persistent a -> Bool #

(/=) :: Persistent a -> Persistent a -> Bool #

Read a => Read (Persistent a) Source # 
Instance details

Defined in ALife.Creatur.Persistent

Show a => Show (Persistent a) Source # 
Instance details

Defined in ALife.Creatur.Persistent

mkPersistent :: a -> FilePath -> Persistent a Source #

Creates a counter that will store its value in the specified file.

putPS :: (Show a, Read a) => a -> StateT (Persistent a) IO () Source #

modifyPS :: (Show a, Read a) => (a -> a) -> StateT (Persistent a) IO () Source #

runPS :: Read a => (a -> b) -> StateT (Persistent a) IO b Source #