| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Shrun.Configuration.Data.Notify
Contents
Synopsis
- data NotifyActionsInit (p :: ConfigPhase) = MkNotifyActionsInit {
- complete :: NotifyActionCompleteF p
- start :: SwitchF p NotifyActionStartSwitch
- data NotifyActionsActive
- _NotifyActionsActiveCompleteAny :: AffineFold NotifyActionsActive NotifyActionComplete
- _NotifyActionsActiveStartAny :: AffineFold NotifyActionsActive ()
- data NotifyP (p :: ConfigPhase) r = MkNotifyP {
- actions :: NotifyActionsF p
- system :: NotifySystemF p r
- timeout :: ConfigPhaseF p NotifyTimeout
- type NotifyArgs = NotifyP 'ConfigPhaseArgs
- type NotifyToml = NotifyP 'ConfigPhaseToml
- type NotifyMerged = NotifyP 'ConfigPhaseMerged
- type NotificationEnv = NotifyP 'ConfigPhaseEnv
- mergeNotifications :: NotifyArgs r -> Maybe (NotifyToml r) -> Maybe (NotifyMerged r)
- toEnv :: (HasCallStack, MonadNotify m, MonadThrow m, NotifyEnvF m ~ r) => NotifyMerged r -> m (NotifyP 'ConfigPhaseEnv r)
NotifyInit
data NotifyActionsInit (p :: ConfigPhase) Source #
Initial notify action config.
Constructors
| MkNotifyActionsInit | |
Fields
| |
Instances
NotifyActive
data NotifyActionsActive Source #
Holds active notif actions. This is morally These, specialized
to our notify action use case.
Constructors
| NotifyActionsActiveComplete NotifyActionComplete | Complete actions active. |
| NotifyActionsActiveStart | Start actions active. |
| NotifyActionsActiveAll NotifyActionComplete | All actions active. |
Instances
| Show NotifyActionsActive Source # | |
Defined in Shrun.Configuration.Data.Notify Methods showsPrec :: Int -> NotifyActionsActive -> ShowS # show :: NotifyActionsActive -> String # showList :: [NotifyActionsActive] -> ShowS # | |
| Eq NotifyActionsActive Source # | |
Defined in Shrun.Configuration.Data.Notify Methods (==) :: NotifyActionsActive -> NotifyActionsActive -> Bool # (/=) :: NotifyActionsActive -> NotifyActionsActive -> Bool # | |
| Pretty NotifyActionsActive Source # | |
Defined in Shrun.Configuration.Data.Notify Methods pretty :: NotifyActionsActive -> Doc ann Source # prettyList :: [NotifyActionsActive] -> Doc ann Source # | |
Notify
data NotifyP (p :: ConfigPhase) r Source #
Holds notification config. We have an invariant that if the notify config
exists (i.e. is Just), then at least one of actionComplete, actionStart
should be Just/True.
Constructors
| MkNotifyP | |
Fields
| |
Instances
type NotifyArgs = NotifyP 'ConfigPhaseArgs Source #
type NotifyToml = NotifyP 'ConfigPhaseToml Source #
type NotifyMerged = NotifyP 'ConfigPhaseMerged Source #
type NotificationEnv = NotifyP 'ConfigPhaseEnv Source #
mergeNotifications :: NotifyArgs r -> Maybe (NotifyToml r) -> Maybe (NotifyMerged r) Source #
Merges args and toml configs.
toEnv :: (HasCallStack, MonadNotify m, MonadThrow m, NotifyEnvF m ~ r) => NotifyMerged r -> m (NotifyP 'ConfigPhaseEnv r) Source #