| Copyright | (c) Amy de Buitléir 2012-2014 |
|---|---|
| License | BSD-style |
| Maintainer | amy@nualeargais.ie |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell98 |
ALife.Creatur.Persistent
Description
A state which persists between runs.
- data Persistent a
- mkPersistent :: a -> FilePath -> Persistent a
- getPS :: Read a => StateT (Persistent a) IO a
- putPS :: (Show a, Read a) => a -> StateT (Persistent a) IO ()
- modifyPS :: (Show a, Read a) => (a -> a) -> StateT (Persistent a) IO ()
- runPS :: Read a => (a -> b) -> StateT (Persistent a) IO b
Documentation
data Persistent a Source
Instances
| Checklist PersistentChecklist | |
| Clock PersistentCounter | |
| Counter PersistentCounter | |
| Eq a => Eq (Persistent a) | |
| Read a => Read (Persistent a) | |
| Show a => Show (Persistent a) |
mkPersistent :: a -> FilePath -> Persistent a Source
Creates a counter that will store its value in the specified file.
getPS :: Read a => StateT (Persistent a) IO a Source
runPS :: Read a => (a -> b) -> StateT (Persistent a) IO b Source