Copyright | (c) Max Amanshauser 2016 |
---|---|
License | MIT |
Maintainer | max@lambdalifting.org |
Safe Haskell | None |
Language | Haskell2010 |
- data MemoryStore k s e a
- mkStore :: MealyInstance k s e a => Text -> IO (MemoryStore k s e a)
- _fsmRead :: MemoryStore k s e a -> k -> STM (Maybe (Instance k s e a))
- _fsmCreate :: MemoryStore k s e a -> Instance k s e a -> STM (Maybe String)
- _fsmUpdate :: MemoryStore k s e a -> k -> MachineTransformer s e a -> IO MealyStatus
- printWal :: MemoryStore k s e a -> k -> IO ()
Documentation
data MemoryStore k s e a Source #
WALStore (MemoryStore k s e a) k Source # | |
MealyInstance k s e a => FSMStore (MemoryStore k s e a) k s e a Source # | |
mkStore :: MealyInstance k s e a => Text -> IO (MemoryStore k s e a) Source #
_fsmCreate :: MemoryStore k s e a -> Instance k s e a -> STM (Maybe String) Source #
For compatibility with the other stores we check existence here
_fsmUpdate :: MemoryStore k s e a -> k -> MachineTransformer s e a -> IO MealyStatus Source #
We need to use a lock here, because we are in the unfortunate position of having to use IO while performing STM operations, which is not possible. Using the lock we can rest assured no concurrent update operation can progress.
printWal :: MemoryStore k s e a -> k -> IO () Source #