Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data AcidBackendT st m a
- runAcidBackendT :: AuthConfig -> AcidState st -> AcidBackendT st m a -> m (Either ServantErr a)
- deriveAcidHasStorage :: Name -> DecsQ
Documentation
data AcidBackendT st m a Source #
Monad transformer that implements storage backend
Instances
runAcidBackendT :: AuthConfig -> AcidState st -> AcidBackendT st m a -> m (Either ServantErr a) Source #
Execute backend action with given connection pool.
deriveAcidHasStorage :: Name -> DecsQ Source #
Derives acid-state HasStorage
instance for functions that are generated in makeModelAcidic
.
Use this as following: @ instance HasModelRead MyState where askModel = authModel
instance HasModelWrite MyState where putModel m v = m { authModel = v }
makeModelAcidic ''MyState deriveAcidHasStorage @