| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Shrun.Notify.MonadNotify
Description
Provides effects for sending notifications.
Synopsis
- class Monad m => MonadNotify (m :: Type -> Type) where
- notify :: ShrunNote -> m (Maybe NotifyException)
- data ShrunNote = MkShrunNote {}
- data NotifyException = MkNotifyException ShrunNote NotifySystemMerged Text
- exitFailureToStderr :: (ExitCode, ByteString) -> Maybe ByteString
Documentation
class Monad m => MonadNotify (m :: Type -> Type) where Source #
General effect for sending notifications.
Instances
| (MonadAppleScript m, MonadDBus m, MonadNotifySend m) => MonadNotify (ShellT (Env r) m) Source # | |
Defined in Shrun.ShellT | |
Holds notification data.
Constructors
| MkShrunNote | |
Fields
| |
Instances
| Show ShrunNote Source # | |
| Eq ShrunNote Source # | |
| (k ~ A_Lens, a ~ UnlinedText, b ~ UnlinedText) => LabelOptic "body" k ShrunNote ShrunNote a b Source # | |
Defined in Shrun.Notify.MonadNotify | |
| (k ~ A_Lens, a ~ UnlinedText, b ~ UnlinedText) => LabelOptic "summary" k ShrunNote ShrunNote a b Source # | |
Defined in Shrun.Notify.MonadNotify | |
| (k ~ A_Lens, a ~ NotifyTimeout, b ~ NotifyTimeout) => LabelOptic "timeout" k ShrunNote ShrunNote a b Source # | |
Defined in Shrun.Notify.MonadNotify | |
| (k ~ A_Lens, a ~ UrgencyLevel, b ~ UrgencyLevel) => LabelOptic "urgency" k ShrunNote ShrunNote a b Source # | |
Defined in Shrun.Notify.MonadNotify | |
data NotifyException Source #
Exception for sending desktop notifications.
Constructors
| MkNotifyException ShrunNote NotifySystemMerged Text |
Instances
| Exception NotifyException Source # | |
Defined in Shrun.Notify.MonadNotify Methods toException :: NotifyException -> SomeException # | |
| Show NotifyException Source # | |
Defined in Shrun.Notify.MonadNotify Methods showsPrec :: Int -> NotifyException -> ShowS # show :: NotifyException -> String # showList :: [NotifyException] -> ShowS # | |
| Eq NotifyException Source # | |
Defined in Shrun.Notify.MonadNotify Methods (==) :: NotifyException -> NotifyException -> Bool # (/=) :: NotifyException -> NotifyException -> Bool # | |
exitFailureToStderr :: (ExitCode, ByteString) -> Maybe ByteString Source #
Maps (ExitCode, stderr) to Just stderr, if the exit code is ExitFailure.