| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Shrun.Notify
Description
Module for sending notifications.
Synopsis
- newtype NotifyMessage = UnsafeNotifyMessage {}
- fromUnlined :: UnlinedText -> NotifyMessage
- sendNotif :: forall m env notifyEnv. (HasAnyError env, HasCallStack, HasCommands env, HasLogging env m, HasNotifyConfig env notifyEnv, MonadAtomic m, MonadCatch m, MonadNotify m, MonadReader env m, MonadRegionLogger m, MonadTime m, NotifyEnvF m ~ notifyEnv) => NotifyMessage -> NotifyMessage -> NotifyUrgency -> m ()
- formatNotifyMessage :: UnlinedText -> [UnlinedText] -> NotifyMessage
Documentation
newtype NotifyMessage Source #
Constructors
| UnsafeNotifyMessage | |
Fields | |
Instances
| IsString NotifyMessage Source # | |
Defined in Shrun.Notify Methods fromString :: String -> NotifyMessage # | |
| Show NotifyMessage Source # | |
Defined in Shrun.Notify Methods showsPrec :: Int -> NotifyMessage -> ShowS # show :: NotifyMessage -> String # showList :: [NotifyMessage] -> ShowS # | |
| Eq NotifyMessage Source # | |
Defined in Shrun.Notify Methods (==) :: NotifyMessage -> NotifyMessage -> Bool # (/=) :: NotifyMessage -> NotifyMessage -> Bool # | |
| (k ~ A_Getter, a ~ Text, b ~ Text) => LabelOptic "unNotifyMessage" k NotifyMessage NotifyMessage a b Source # | |
Defined in Shrun.Notify Methods labelOptic :: Optic k NoIx NotifyMessage NotifyMessage a b Source # | |
Arguments
| :: forall m env notifyEnv. (HasAnyError env, HasCallStack, HasCommands env, HasLogging env m, HasNotifyConfig env notifyEnv, MonadAtomic m, MonadCatch m, MonadNotify m, MonadReader env m, MonadRegionLogger m, MonadTime m, NotifyEnvF m ~ notifyEnv) | |
| => NotifyMessage | Notif summary |
| -> NotifyMessage | Notif body |
| -> NotifyUrgency | Notif urgency |
| -> m () |
Sends a notification if they are With (linux only). Logs any failed sends.
formatNotifyMessage :: UnlinedText -> [UnlinedText] -> NotifyMessage Source #