Safe Haskell | None |
---|---|
Language | GHC2021 |
Halogen.Subscription
Synopsis
- data Subscribe (m :: Type -> Type) a = Subscribe {}
- create :: (MonadIO m, MonadUUID m) => m (Subscribe m a)
- newtype Emitter (m :: Type -> Type) a = Emitter {
- registerHandler :: (a -> m ()) -> m (Subscription m)
- hoistEmitter :: forall (m :: Type -> Type) a. MonadUnliftIO m => Emitter IO a -> Emitter m a
- makeEmitter :: Functor m => ((a -> m ()) -> m (m ())) -> Emitter m a
- newtype Listener (m :: Type -> Type) a = Listener {
- notify :: a -> m ()
- notify :: Listener m a -> a -> m ()
- newtype Subscription (m :: Type -> Type) = Subscription {
- unsubscribe :: m ()
- hoistSubscription :: forall (m :: Type -> Type) (n :: Type -> Type). (m ~> n) -> Subscription m -> Subscription n
- subscribe :: Functor m => Emitter m a -> (a -> m r) -> m (Subscription m)
- unsubscribe :: Subscription m -> m ()
- fold :: forall (m :: Type -> Type) a b. MonadIO m => (a -> b -> b) -> Emitter m a -> b -> Emitter m b
- filter :: forall (m :: Type -> Type) a. Applicative m => (a -> Bool) -> Emitter m a -> Emitter m a
Documentation
newtype Emitter (m :: Type -> Type) a Source #
Constructors
Emitter | |
Fields
|
hoistEmitter :: forall (m :: Type -> Type) a. MonadUnliftIO m => Emitter IO a -> Emitter m a Source #
makeEmitter :: Functor m => ((a -> m ()) -> m (m ())) -> Emitter m a Source #
newtype Subscription (m :: Type -> Type) Source #
Constructors
Subscription | |
Fields
|
hoistSubscription :: forall (m :: Type -> Type) (n :: Type -> Type). (m ~> n) -> Subscription m -> Subscription n Source #
unsubscribe :: Subscription m -> m () Source #