wled-json-0.0.1.0: Convenient interface for interacting with WLED devices
Copyright(c) Andreas Ländle 2024
LicenseBSD-3
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

WLED.Types

Description

Types representing states and state changes of a WLED device.

Synopsis

Documentation

data State t f f' Source #

State data type.

Constructors

State 

Fields

Instances

Instances details
Monoid StatePatch Source # 
Instance details

Defined in WLED.Types

Semigroup StatePatch Source # 
Instance details

Defined in WLED.Types

FunctorB (State Bare f :: (Type -> Type) -> Type) Source # 
Instance details

Defined in WLED.Types

Methods

bmap :: (forall (a :: k). f0 a -> g a) -> State Bare f f0 -> State Bare f g #

Functor f => FunctorB (State Covered f :: (Type -> Type) -> Type) Source # 
Instance details

Defined in WLED.Types

Methods

bmap :: (forall (a :: k). f0 a -> g a) -> State Covered f f0 -> State Covered f g #

ApplicativeT (State Covered) Source # 
Instance details

Defined in WLED.Types

Methods

tpure :: forall f (x :: k'). (forall (a :: k). f a) -> State Covered f x #

tprod :: forall (f :: k -> Type) (x :: k') (g :: k -> Type). State Covered f x -> State Covered g x -> State Covered (Product f g) x #

FunctorT (State Covered) Source # 
Instance details

Defined in WLED.Types

Methods

tmap :: forall f g (x :: k'). (forall (a :: k). f a -> g a) -> State Covered f x -> State Covered g x #

FromJSON (State Bare f f') Source # 
Instance details

Defined in WLED.Types

(FromJSON (f Bool), FromJSON (f Int), FromJSON (f (Nightlight Covered f')), FromJSON (f [Segment Covered f'])) => FromJSON (State Covered f f') Source # 
Instance details

Defined in WLED.Types

ToJSON (State Bare f f') Source # 
Instance details

Defined in WLED.Types

Methods

toJSON :: State Bare f f' -> Value #

toEncoding :: State Bare f f' -> Encoding #

toJSONList :: [State Bare f f'] -> Value #

toEncodingList :: [State Bare f f'] -> Encoding #

omitField :: State Bare f f' -> Bool #

(ToJSON (f Bool), ToJSON (f Int), ToJSON (f (Nightlight Covered f')), ToJSON (f [Segment Covered f'])) => ToJSON (State Covered f f') Source # 
Instance details

Defined in WLED.Types

Generic (State t f f') Source # 
Instance details

Defined in WLED.Types

Associated Types

type Rep (State t f f') :: Type -> Type #

Methods

from :: State t f f' -> Rep (State t f f') x #

to :: Rep (State t f f') x -> State t f f' #

Show (State Bare f f') Source # 
Instance details

Defined in WLED.Types

Methods

showsPrec :: Int -> State Bare f f' -> ShowS #

show :: State Bare f f' -> String #

showList :: [State Bare f f'] -> ShowS #

(Show (f Bool), Show (f Int), Show (f (Nightlight Covered f')), Show (f [Segment Covered f'])) => Show (State Covered f f') Source # 
Instance details

Defined in WLED.Types

Methods

showsPrec :: Int -> State Covered f f' -> ShowS #

show :: State Covered f f' -> String #

showList :: [State Covered f f'] -> ShowS #

Eq (State Bare f f') Source # 
Instance details

Defined in WLED.Types

Methods

(==) :: State Bare f f' -> State Bare f f' -> Bool #

(/=) :: State Bare f f' -> State Bare f f' -> Bool #

(Eq (f Bool), Eq (f Int), Eq (f (Nightlight Covered f')), Eq (f [Segment Covered f'])) => Eq (State Covered f f') Source # 
Instance details

Defined in WLED.Types

Methods

(==) :: State Covered f f' -> State Covered f f' -> Bool #

(/=) :: State Covered f f' -> State Covered f f' -> Bool #

type Rep (State t f f') Source # 
Instance details

Defined in WLED.Types

data Nightlight t f Source #

Nightlight data type.

Constructors

Nightlight 

Instances

Instances details
BareB Nightlight Source # 
Instance details

Defined in WLED.Types

ApplicativeB (Nightlight Covered) Source # 
Instance details

Defined in WLED.Types

Methods

bpure :: (forall (a :: k). f a) -> Nightlight Covered f #

bprod :: forall (f :: k -> Type) (g :: k -> Type). Nightlight Covered f -> Nightlight Covered g -> Nightlight Covered (Product f g) #

ConstraintsB (Nightlight Bare) Source # 
Instance details

Defined in WLED.Types

Associated Types

type AllB c (Nightlight Bare) #

Methods

baddDicts :: forall (c :: k -> Constraint) (f :: k -> Type). AllB c (Nightlight Bare) => Nightlight Bare f -> Nightlight Bare (Product (Dict c) f) #

ConstraintsB (Nightlight Covered) Source # 
Instance details

Defined in WLED.Types

Associated Types

type AllB c (Nightlight Covered) #

Methods

baddDicts :: forall (c :: k -> Constraint) (f :: k -> Type). AllB c (Nightlight Covered) => Nightlight Covered f -> Nightlight Covered (Product (Dict c) f) #

FunctorB (Nightlight Bare) Source # 
Instance details

Defined in WLED.Types

Methods

bmap :: (forall (a :: k). f a -> g a) -> Nightlight Bare f -> Nightlight Bare g #

FunctorB (Nightlight Covered) Source # 
Instance details

Defined in WLED.Types

Methods

bmap :: (forall (a :: k). f a -> g a) -> Nightlight Covered f -> Nightlight Covered g #

AllBF FromJSON f (Nightlight Bare) => FromJSON (Nightlight Bare f) Source # 
Instance details

Defined in WLED.Types

AllBF FromJSON f (Nightlight Covered) => FromJSON (Nightlight Covered f) Source # 
Instance details

Defined in WLED.Types

AllBF ToJSON f (Nightlight Bare) => ToJSON (Nightlight Bare f) Source # 
Instance details

Defined in WLED.Types

AllBF ToJSON f (Nightlight Covered) => ToJSON (Nightlight Covered f) Source # 
Instance details

Defined in WLED.Types

Alternative f => Monoid (Nightlight Covered f) Source # 
Instance details

Defined in WLED.Types

Alternative f => Semigroup (Nightlight Covered f) Source # 
Instance details

Defined in WLED.Types

Generic (Nightlight t f) Source # 
Instance details

Defined in WLED.Types

Associated Types

type Rep (Nightlight t f) :: Type -> Type #

Methods

from :: Nightlight t f -> Rep (Nightlight t f) x #

to :: Rep (Nightlight t f) x -> Nightlight t f #

AllBF Show f (Nightlight Bare) => Show (Nightlight Bare f) Source # 
Instance details

Defined in WLED.Types

AllBF Show f (Nightlight Covered) => Show (Nightlight Covered f) Source # 
Instance details

Defined in WLED.Types

AllBF Eq f (Nightlight Bare) => Eq (Nightlight Bare f) Source # 
Instance details

Defined in WLED.Types

AllBF Eq f (Nightlight Covered) => Eq (Nightlight Covered f) Source # 
Instance details

Defined in WLED.Types

type AllB (c :: Type -> Constraint) (Nightlight Bare) Source # 
Instance details

Defined in WLED.Types

type AllB (c :: Type -> Constraint) (Nightlight Covered) Source # 
Instance details

Defined in WLED.Types

type Rep (Nightlight t f) Source # 
Instance details

Defined in WLED.Types

type Rep (Nightlight t f) = D1 ('MetaData "Nightlight" "WLED.Types" "wled-json-0.0.1.0-G2WaICdQEyYARSm8URLPei" 'False) (C1 ('MetaCons "Nightlight" 'PrefixI 'True) ((S1 ('MetaSel ('Just "nightlightOn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Bool)) :*: S1 ('MetaSel ('Just "nightlightDur") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Int))) :*: (S1 ('MetaSel ('Just "nightlightMode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Int)) :*: (S1 ('MetaSel ('Just "nightlightTbri") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Int)) :*: S1 ('MetaSel ('Just "nightlightRem") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Int))))))

data Segment t f Source #

Segment data type.

Constructors

Segment 

Fields

Instances

Instances details
BareB Segment Source # 
Instance details

Defined in WLED.Types

ApplicativeB (Segment Covered) Source # 
Instance details

Defined in WLED.Types

Methods

bpure :: (forall (a :: k). f a) -> Segment Covered f #

bprod :: forall (f :: k -> Type) (g :: k -> Type). Segment Covered f -> Segment Covered g -> Segment Covered (Product f g) #

ConstraintsB (Segment Bare) Source # 
Instance details

Defined in WLED.Types

Associated Types

type AllB c (Segment Bare) #

Methods

baddDicts :: forall (c :: k -> Constraint) (f :: k -> Type). AllB c (Segment Bare) => Segment Bare f -> Segment Bare (Product (Dict c) f) #

ConstraintsB (Segment Covered) Source # 
Instance details

Defined in WLED.Types

Associated Types

type AllB c (Segment Covered) #

Methods

baddDicts :: forall (c :: k -> Constraint) (f :: k -> Type). AllB c (Segment Covered) => Segment Covered f -> Segment Covered (Product (Dict c) f) #

FunctorB (Segment Bare) Source # 
Instance details

Defined in WLED.Types

Methods

bmap :: (forall (a :: k). f a -> g a) -> Segment Bare f -> Segment Bare g #

FunctorB (Segment Covered) Source # 
Instance details

Defined in WLED.Types

Methods

bmap :: (forall (a :: k). f a -> g a) -> Segment Covered f -> Segment Covered g #

AllBF FromJSON f (Segment Bare) => FromJSON (Segment Bare f) Source # 
Instance details

Defined in WLED.Types

AllBF FromJSON f (Segment Covered) => FromJSON (Segment Covered f) Source # 
Instance details

Defined in WLED.Types

AllBF ToJSON f (Segment Bare) => ToJSON (Segment Bare f) Source # 
Instance details

Defined in WLED.Types

AllBF ToJSON f (Segment Covered) => ToJSON (Segment Covered f) Source # 
Instance details

Defined in WLED.Types

Alternative f => Monoid (Segment Covered f) Source # 
Instance details

Defined in WLED.Types

Alternative f => Semigroup (Segment Covered f) Source # 
Instance details

Defined in WLED.Types

Generic (Segment t f) Source # 
Instance details

Defined in WLED.Types

Associated Types

type Rep (Segment t f) :: Type -> Type #

Methods

from :: Segment t f -> Rep (Segment t f) x #

to :: Rep (Segment t f) x -> Segment t f #

AllBF Show f (Segment Bare) => Show (Segment Bare f) Source # 
Instance details

Defined in WLED.Types

AllBF Show f (Segment Covered) => Show (Segment Covered f) Source # 
Instance details

Defined in WLED.Types

AllBF Eq f (Segment Bare) => Eq (Segment Bare f) Source # 
Instance details

Defined in WLED.Types

Methods

(==) :: Segment Bare f -> Segment Bare f -> Bool #

(/=) :: Segment Bare f -> Segment Bare f -> Bool #

AllBF Eq f (Segment Covered) => Eq (Segment Covered f) Source # 
Instance details

Defined in WLED.Types

type AllB (c :: Type -> Constraint) (Segment Bare) Source # 
Instance details

Defined in WLED.Types

type AllB (c :: Type -> Constraint) (Segment Bare) = GAll 0 c (GAllRepB (Segment Bare))
type AllB (c :: Type -> Constraint) (Segment Covered) Source # 
Instance details

Defined in WLED.Types

type Rep (Segment t f) Source # 
Instance details

Defined in WLED.Types

type Rep (Segment t f) = D1 ('MetaData "Segment" "WLED.Types" "wled-json-0.0.1.0-G2WaICdQEyYARSm8URLPei" 'False) (C1 ('MetaCons "Segment" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "segmentId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Int)) :*: (S1 ('MetaSel ('Just "segmentStart") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Int)) :*: S1 ('MetaSel ('Just "segmentStop") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Int)))) :*: ((S1 ('MetaSel ('Just "segmentLen") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Int)) :*: S1 ('MetaSel ('Just "segmentGrp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Int))) :*: (S1 ('MetaSel ('Just "segmentSpc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Int)) :*: S1 ('MetaSel ('Just "segmentOf") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Int))))) :*: ((S1 ('MetaSel ('Just "segmentOn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Bool)) :*: (S1 ('MetaSel ('Just "segmentFrz") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Bool)) :*: S1 ('MetaSel ('Just "segmentBri") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Int)))) :*: ((S1 ('MetaSel ('Just "segmentCct") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Int)) :*: S1 ('MetaSel ('Just "segmentSet") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Int))) :*: (S1 ('MetaSel ('Just "segmentCol") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f [[Int]])) :*: S1 ('MetaSel ('Just "segmentFx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Int)))))) :*: (((S1 ('MetaSel ('Just "segmentSx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Int)) :*: (S1 ('MetaSel ('Just "segmentIx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Int)) :*: S1 ('MetaSel ('Just "segmentPal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Int)))) :*: ((S1 ('MetaSel ('Just "segmentC1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Int)) :*: S1 ('MetaSel ('Just "segmentC2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Int))) :*: (S1 ('MetaSel ('Just "segmentC3") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Int)) :*: S1 ('MetaSel ('Just "segmentSel") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Bool))))) :*: ((S1 ('MetaSel ('Just "segmentRev") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Bool)) :*: (S1 ('MetaSel ('Just "segmentMi") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Bool)) :*: S1 ('MetaSel ('Just "segmentO1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Bool)))) :*: ((S1 ('MetaSel ('Just "segmentO2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Bool)) :*: S1 ('MetaSel ('Just "segmentO3") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Bool))) :*: (S1 ('MetaSel ('Just "segmentSi") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Int)) :*: S1 ('MetaSel ('Just "segmentM12") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Wear t f Int))))))))