| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Tox.Crypto.Core.Keyed
Description
Monad class for caching of combined keys
Synopsis
- class (Monad m, Applicative m) => Keyed m where
- getCombinedKey :: SecretKey -> PublicKey -> m CombinedKey
- newtype NullKeyed a = NullKeyed {
- runNullKeyed :: a
- type KeyRing = Map (SecretKey, PublicKey) CombinedKey
- newtype KeyedT m a = KeyedT (StateT KeyRing m a)
- runKeyedT :: Monad m => KeyedT m a -> KeyRing -> m (a, KeyRing)
- evalKeyedT :: Monad m => KeyedT m a -> KeyRing -> m a
Documentation
class (Monad m, Applicative m) => Keyed m where Source #
Methods
getCombinedKey :: SecretKey -> PublicKey -> m CombinedKey Source #
Instances
trivial instance: the trivial monad, with no caching of keys
Constructors
| NullKeyed | |
Fields
| |
caches computations of combined keys. Makes no attempt to delete old keys.
Instances
| MonadTrans KeyedT Source # | |
Defined in Tox.Crypto.Core.Keyed | |
| DhtNodeMonad TestDhtNodeMonad Source # | |
Defined in Tox.DHT.Operation | |
| (MonadState s m, Applicative m) => MonadState s (KeyedT m) Source # | |
| MonadWriter w m => MonadWriter w (KeyedT m) Source # | |
| Monad m => Monad (KeyedT m) Source # | |
| Functor m => Functor (KeyedT m) Source # | |
| Monad m => Applicative (KeyedT m) Source # | |
| MonadIO m => MonadIO (KeyedT m) Source # | |
Defined in Tox.Crypto.Core.Keyed | |
| Timed m => Timed (KeyedT m) Source # | |
| MonadRandomBytes m => MonadRandomBytes (KeyedT m) Source # | |
Defined in Tox.Crypto.Core.Keyed | |
| (Monad m, Applicative m) => Keyed (KeyedT m) Source # | |
Defined in Tox.Crypto.Core.Keyed Methods getCombinedKey :: SecretKey -> PublicKey -> KeyedT m CombinedKey Source # | |
| Networked m => Networked (KeyedT m) Source # | |
Defined in Tox.Network.Core.Networked | |