ble-0.2.0.0: Bluetooth Low Energy (BLE) peripherals

Safe HaskellNone
LanguageHaskell2010

Bluetooth.Internal.Errors

Synopsis

Documentation

newtype Handler a Source #

Constructors

Handler 

Instances

Monad Handler Source # 

Methods

(>>=) :: Handler a -> (a -> Handler b) -> Handler b #

(>>) :: Handler a -> Handler b -> Handler b #

return :: a -> Handler a #

fail :: String -> Handler a #

Functor Handler Source # 

Methods

fmap :: (a -> b) -> Handler a -> Handler b #

(<$) :: a -> Handler b -> Handler a #

Applicative Handler Source # 

Methods

pure :: a -> Handler a #

(<*>) :: Handler (a -> b) -> Handler a -> Handler b #

(*>) :: Handler a -> Handler b -> Handler b #

(<*) :: Handler a -> Handler b -> Handler a #

MonadIO Handler Source # 

Methods

liftIO :: IO a -> Handler a #

MonadError Text Handler Source # 

Methods

throwError :: Text -> Handler a #

catchError :: Handler a -> (Text -> Handler a) -> Handler a #

Generic (Handler a) Source # 

Associated Types

type Rep (Handler a) :: * -> * #

Methods

from :: Handler a -> Rep (Handler a) x #

to :: Rep (Handler a) x -> Handler a #

HasWriteValue (Characteristic typ0) (Maybe (typ0 -> Handler Bool)) Source # 

Methods

writeValue :: Lens' (Characteristic typ0) (Maybe (typ0 -> Handler Bool)) Source #

HasReadValue (Characteristic typ0) (Maybe (Handler typ0)) Source # 

Methods

readValue :: Lens' (Characteristic typ0) (Maybe (Handler typ0)) Source #

type Rep (Handler a) Source # 
type Rep (Handler a) = D1 (MetaData "Handler" "Bluetooth.Internal.Errors" "ble-0.2.0.0-8ihCLhHuOZB7pVwK3AJIg3" True) (C1 (MetaCons "Handler" PrefixI True) (S1 (MetaSel (Just Symbol "getReadValue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (ExceptT Text IO a))))

errorFailed :: Handler a Source #

Generic failure

errorInvalidValueLength :: Handler a Source #

Indicates that the argument has invalid length. Should not be used from a read handler