Hermes-0.0.3: Message-based middleware layerSource codeContentsIndex
Network.Hermes.Misc
Description
Miscellaneous functions. Not really for public consumption.
Synopsis
ghead :: (Data x, Typeable y) => x -> y
byteStringToInteger :: ByteString -> Integer
runTMVar :: TMVar s -> StateT s IO a -> IO a
throwM :: (MonadIO m, Exception e) => e -> m a
modifyTVar :: TVar a -> (a -> a) -> STM ()
type Type = String
showType :: Typeable a => a -> Type
trapForkIO :: String -> IO () -> IO ThreadId
rsaEncrypt :: RandomGen g => g -> PublicKey -> ByteString -> (ByteString, g)
rsaDecrypt :: PrivateKey -> ByteString -> ByteString
rsaVerify :: PublicKey -> ByteString -> ByteString -> Bool
rsaSign :: PrivateKey -> ByteString -> ByteString
swap :: Ord k => k -> v -> Map k v -> (Maybe v, Map k v)
listenTVar :: Eq a => TVar a -> (a -> IO ()) -> IO ThreadId
adjustWithDefault :: Ord k => a -> (a -> a) -> k -> Map k a -> Map k a
Documentation
ghead :: (Data x, Typeable y) => x -> ySource
byteStringToInteger :: ByteString -> IntegerSource
runTMVar :: TMVar s -> StateT s IO a -> IO aSource
throwM :: (MonadIO m, Exception e) => e -> m aSource
modifyTVar :: TVar a -> (a -> a) -> STM ()Source
type Type = StringSource
Our notion of types: A shown Typeable.
showType :: Typeable a => a -> TypeSource
trapForkIO :: String -> IO () -> IO ThreadIdSource
Logs any unhandled exceptions
rsaEncrypt :: RandomGen g => g -> PublicKey -> ByteString -> (ByteString, g)Source
Encryption stuff
rsaDecrypt :: PrivateKey -> ByteString -> ByteStringSource
rsaVerify :: PublicKey -> ByteString -> ByteString -> BoolSource
rsaSign :: PrivateKey -> ByteString -> ByteStringSource
swap :: Ord k => k -> v -> Map k v -> (Maybe v, Map k v)Source
Swap values in a Map. Returns the old value, if any.
listenTVar :: Eq a => TVar a -> (a -> IO ()) -> IO ThreadIdSource
Executes an action once for each value of the TVar. May skip values if it changes quickly.
adjustWithDefault :: Ord k => a -> (a -> a) -> k -> Map k a -> Map k aSource
Produced by Haddock version 2.6.1