hemokit-0.6.6: Haskell port of the Emokit EEG project

Safe HaskellSafe-Inferred
LanguageHaskell2010

Hemokit.Internal.Utils

Synopsis

Documentation

withJustM :: Monad m => m (Maybe a) -> (a -> m ()) -> m Bool Source

If the monad retuns a Just, runs the function on its contents. Returns True if the action was executed.

untilNothing :: Monad m => m (Maybe a) -> (a -> m ()) -> m Bool Source

Runs the monadic action as long as the producer returns Justs. Returns True if the action was ever executed.

textBase64 :: ByteString -> Text Source

Base64-encodes a ByteString as Text.

This cannot fail since Base64 is ASCII.