Safe Haskell | None |
---|---|
Language | Haskell2010 |
Pure serialisable futures.
This API is experimental at the moment, and parts of it may change.
Documentation
data TimedResult tk r Source #
Instances
Instances
data SExpect wi ri tk Source #
SExpect | |
|
Instances
(Eq wi, Eq tk, Eq ri) => Eq (SExpect wi ri tk) Source # | |
(Ord wi, Ord tk, Ord ri) => Ord (SExpect wi ri tk) Source # | |
Defined in Control.Schedule.Future compare :: SExpect wi ri tk -> SExpect wi ri tk -> Ordering # (<) :: SExpect wi ri tk -> SExpect wi ri tk -> Bool # (<=) :: SExpect wi ri tk -> SExpect wi ri tk -> Bool # (>) :: SExpect wi ri tk -> SExpect wi ri tk -> Bool # (>=) :: SExpect wi ri tk -> SExpect wi ri tk -> Bool # max :: SExpect wi ri tk -> SExpect wi ri tk -> SExpect wi ri tk # min :: SExpect wi ri tk -> SExpect wi ri tk -> SExpect wi ri tk # | |
(Ord wi, Read wi, Read tk, Read ri) => Read (SExpect wi ri tk) Source # | |
(Show wi, Show tk, Show ri) => Show (SExpect wi ri tk) Source # | |
Generic (SExpect wi ri tk) Source # | |
Ord wi => Semigroup (SExpect wi ri tk) Source # | |
Ord wi => Monoid (SExpect wi ri tk) Source # | |
type Rep (SExpect wi ri tk) Source # | |
Defined in Control.Schedule.Future type Rep (SExpect wi ri tk) = D1 (MetaData "SExpect" "Control.Schedule.Future" "schedule-0.1.0.0-3xvNd7Ubdg12LtQp9cpuaG" False) (C1 (MetaCons "SExpect" PrefixI True) (S1 (MetaSel (Just "seExpects") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (OMap wi (Task tk))) :*: S1 (MetaSel (Just "seResults") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (OMap wi (TimedResult tk ri))))) |
_seResults :: forall wi ri tk ri. Lens (SExpect wi ri tk) (SExpect wi ri tk) (OMap wi (TimedResult tk ri)) (OMap wi (TimedResult tk ri)) Source #
Instances
Eq e => Eq (SFStatus e) Source # | |
Ord e => Ord (SFStatus e) Source # | |
Read e => Read (SFStatus e) Source # | |
Show e => Show (SFStatus e) Source # | |
Generic (SFStatus e) Source # | |
type Rep (SFStatus e) Source # | |
Defined in Control.Schedule.Future type Rep (SFStatus e) = D1 (MetaData "SFStatus" "Control.Schedule.Future" "schedule-0.1.0.0-3xvNd7Ubdg12LtQp9cpuaG" False) (C1 (MetaCons "Expecting" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 e)) :+: C1 (MetaCons "NotExpecting" PrefixI False) (U1 :: Type -> Type)) |
SFEAlreadyFinished | |
SFEInvalidPrecondition | |
|
Instances
Eq SFError Source # | |
Ord SFError Source # | |
Read SFError Source # | |
Show SFError Source # | |
Generic SFError Source # | |
type Rep SFError Source # | |
Defined in Control.Schedule.Future type Rep SFError = D1 (MetaData "SFError" "Control.Schedule.Future" "schedule-0.1.0.0-3xvNd7Ubdg12LtQp9cpuaG" False) (C1 (MetaCons "SFEAlreadyFinished" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "SFEInvalidPrecondition" PrefixI True) (S1 (MetaSel (Just "sfePreExpect") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (SFStatus ())) :*: S1 (MetaSel (Just "sfePreActual") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (SFStatus ())))) |
sCheckStatus :: (HasCallStack, Ord wi, Ord wo) => wi -> wo -> Lens' s (SFuture wo r) -> Lens' s (SExpect wi r tk) -> s -> SFStatusFull wo tk Source #
sExpectFuture :: (Ord wi, Ord wo) => TickDelta -> tk -> wi -> wo -> Lens' s (SFuture wo r) -> Lens' s (SExpect wi r tk) -> Lens' s (Schedule tk) -> s -> Either SFError s Source #
sExpectCancel :: (Ord wi, Ord wo) => wi -> wo -> Lens' s (SFuture wo r) -> Lens' s (SExpect wi r tk) -> Lens' s (Schedule tk) -> s -> Either SFError s Source #