Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Device = Device {}
- data HSBK = HSBK {
- hue :: Word16
- saturation :: Word16
- brightness :: Word16
- kelvin :: Word16
- data LifxError
- class MonadIO m => MonadLifxIO m where
- getSocket :: m Socket
- getSource :: m Word32
- getTimeout :: m Int
- incrementCounter :: m ()
- getCounter :: m Word8
- lifxThrowIO :: LifxError -> m a
- handleOldMessage :: Word8 -> Word8 -> Word16 -> ByteString -> m ()
- newtype LifxT m a = LifxT {}
- unLifx :: (Socket, Word32, Int) -> Word8 -> LifxT m a -> m (Either LifxError (a, Word8))
- succ' :: (Eq a, Bounded a, Enum a) => a -> a
Documentation
HSBK | |
|
Instances
Generic HSBK Source # | |
Show HSBK Source # | |
Eq HSBK Source # | |
Ord HSBK Source # | |
type Rep HSBK Source # | |
Defined in Lifx.Lan.Internal type Rep HSBK = D1 ('MetaData "HSBK" "Lifx.Lan.Internal" "lifx-lan-0.8.3-30j063vj3wPEAgIf7LzxCG" 'False) (C1 ('MetaCons "HSBK" 'PrefixI 'True) ((S1 ('MetaSel ('Just "hue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16) :*: S1 ('MetaSel ('Just "saturation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16)) :*: (S1 ('MetaSel ('Just "brightness") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16) :*: S1 ('MetaSel ('Just "kelvin") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16)))) |
Instances
class MonadIO m => MonadLifxIO m where Source #
A monad for sending and receiving LIFX messages.
getSocket :: m Socket Source #
getSource :: m Word32 Source #
getTimeout :: m Int Source #
incrementCounter :: m () Source #
getCounter :: m Word8 Source #
lifxThrowIO :: LifxError -> m a Source #
:: Word8 | expected counter value |
-> Word8 | actual counter value |
-> Word16 | packet type |
-> ByteString | payload |
-> m () |
Instances
MonadIO m => MonadLifxIO (LifxT m) Source # | |
Defined in Lifx.Lan.Internal getSocket :: LifxT m Socket Source # getSource :: LifxT m Word32 Source # getTimeout :: LifxT m Int Source # incrementCounter :: LifxT m () Source # getCounter :: LifxT m Word8 Source # lifxThrowIO :: LifxError -> LifxT m a Source # handleOldMessage :: Word8 -> Word8 -> Word16 -> ByteString -> LifxT m () Source # |