navi-0.1: A utility program for sending system notifications.
Safe HaskellSafe-Inferred
LanguageGHC2021

Navi.NaviT

Description

Provides NaviT, the main type that runs the application.

Synopsis

Documentation

newtype NaviT e m a Source #

NaviT is the core type used to run the application.

Constructors

MkNaviT (ReaderT e m a) 

Instances

Instances details
Monad m => MonadReader e (NaviT e m) Source # 
Instance details

Defined in Navi.NaviT

Methods

ask :: NaviT e m e Source #

local :: (e -> e) -> NaviT e m a -> NaviT e m a Source #

reader :: (e -> a) -> NaviT e m a Source #

MonadTrans (NaviT e) Source # 
Instance details

Defined in Navi.NaviT

Methods

lift :: Monad m => m a -> NaviT e m a Source #

MonadIO m => MonadIO (NaviT e m) Source # 
Instance details

Defined in Navi.NaviT

Methods

liftIO :: IO a -> NaviT e m a Source #

Applicative m => Applicative (NaviT e m) Source # 
Instance details

Defined in Navi.NaviT

Methods

pure :: a -> NaviT e m a Source #

(<*>) :: NaviT e m (a -> b) -> NaviT e m a -> NaviT e m b Source #

liftA2 :: (a -> b -> c) -> NaviT e m a -> NaviT e m b -> NaviT e m c Source #

(*>) :: NaviT e m a -> NaviT e m b -> NaviT e m b Source #

(<*) :: NaviT e m a -> NaviT e m b -> NaviT e m a Source #

Functor m => Functor (NaviT e m) Source # 
Instance details

Defined in Navi.NaviT

Methods

fmap :: (a -> b) -> NaviT e m a -> NaviT e m b Source #

(<$) :: a -> NaviT e m b -> NaviT e m a Source #

Monad m => Monad (NaviT e m) Source # 
Instance details

Defined in Navi.NaviT

Methods

(>>=) :: NaviT e m a -> (a -> NaviT e m b) -> NaviT e m b Source #

(>>) :: NaviT e m a -> NaviT e m b -> NaviT e m b Source #

return :: a -> NaviT e m a Source #

MonadCatch m => MonadCatch (NaviT e m) Source # 
Instance details

Defined in Navi.NaviT

Methods

catch :: Exception e0 => NaviT e m a -> (e0 -> NaviT e m a) -> NaviT e m a Source #

MonadMask m => MonadMask (NaviT e m) Source # 
Instance details

Defined in Navi.NaviT

Methods

mask :: ((forall a. NaviT e m a -> NaviT e m a) -> NaviT e m b) -> NaviT e m b Source #

uninterruptibleMask :: ((forall a. NaviT e m a -> NaviT e m a) -> NaviT e m b) -> NaviT e m b Source #

generalBracket :: NaviT e m a -> (a -> ExitCase b -> NaviT e m c) -> (a -> NaviT e m b) -> NaviT e m (b, c) Source #

MonadThrow m => MonadThrow (NaviT e m) Source # 
Instance details

Defined in Navi.NaviT

Methods

throwM :: Exception e0 => e0 -> NaviT e m a Source #

MonadAsync m => MonadAsync (NaviT e m) Source # 
Instance details

Defined in Navi.NaviT

Methods

async :: HasCallStack => NaviT e m a -> NaviT e m (Async a)

asyncBound :: HasCallStack => NaviT e m a -> NaviT e m (Async a)

asyncOn :: HasCallStack => Int -> NaviT e m a -> NaviT e m (Async a)

asyncWithUnmask :: HasCallStack => ((forall b. NaviT e m b -> NaviT e m b) -> NaviT e m a) -> NaviT e m (Async a)

asyncOnWithUnmask :: HasCallStack => Int -> ((forall b. NaviT e m b -> NaviT e m b) -> NaviT e m a) -> NaviT e m (Async a)

withAsync :: HasCallStack => NaviT e m a -> (Async a -> NaviT e m b) -> NaviT e m b

withAsyncBound :: HasCallStack => NaviT e m a -> (Async a -> NaviT e m b) -> NaviT e m b

withAsyncOn :: HasCallStack => Int -> NaviT e m a -> (Async a -> NaviT e m b) -> NaviT e m b

withAsyncWithUnmask :: HasCallStack => ((forall c. NaviT e m c -> NaviT e m c) -> NaviT e m a) -> (Async a -> NaviT e m b) -> NaviT e m b

withAsyncOnWithUnmask :: HasCallStack => Int -> ((forall c. NaviT e m c -> NaviT e m c) -> NaviT e m a) -> (Async a -> NaviT e m b) -> NaviT e m b

linkOnly :: HasCallStack => (SomeException -> Bool) -> Async a -> NaviT e m ()

link2Only :: HasCallStack => (SomeException -> Bool) -> Async a -> Async b -> NaviT e m ()

race :: HasCallStack => NaviT e m a -> NaviT e m b -> NaviT e m (Either a b)

concurrently :: HasCallStack => NaviT e m a -> NaviT e m b -> NaviT e m (a, b)

concurrently_ :: HasCallStack => NaviT e m a -> NaviT e m b -> NaviT e m ()

MonadFileReader m => MonadFileReader (NaviT e m) Source # 
Instance details

Defined in Navi.NaviT

MonadHandleWriter m => MonadHandleWriter (NaviT e m) Source # 
Instance details

Defined in Navi.NaviT

Methods

openBinaryFile :: Path -> IOMode -> NaviT e m Handle #

withBinaryFile :: HasCallStack => Path -> IOMode -> (Handle -> NaviT e m a) -> NaviT e m a

hClose :: Handle -> NaviT e m () #

hFlush :: Handle -> NaviT e m () #

hSetFileSize :: Handle -> Integer -> NaviT e m ()

hSetBuffering :: Handle -> BufferMode -> NaviT e m ()

hSeek :: Handle -> SeekMode -> Integer -> NaviT e m ()

hTell :: Handle -> NaviT e m Integer

hSetEcho :: Handle -> Bool -> NaviT e m ()

hPut :: Handle -> ByteString -> NaviT e m () #

hPutNonBlocking :: Handle -> ByteString -> NaviT e m ByteString

MonadIORef m => MonadIORef (NaviT e m) Source # 
Instance details

Defined in Navi.NaviT

Methods

newIORef :: HasCallStack => a -> NaviT e m (IORef a) #

readIORef :: HasCallStack => IORef a -> NaviT e m a #

writeIORef :: HasCallStack => IORef a -> a -> NaviT e m () #

atomicWriteIORef :: HasCallStack => IORef a -> a -> NaviT e m ()

modifyIORef' :: HasCallStack => IORef a -> (a -> a) -> NaviT e m () #

atomicModifyIORef' :: HasCallStack => IORef a -> (a -> (a, b)) -> NaviT e m b

(HasLogEnv env, HasLogQueue env) => MonadLogger (NaviT env IO) Source # 
Instance details

Defined in Navi.NaviT

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> NaviT env IO () Source #

(HasLogEnv env, HasLogQueue env) => MonadLoggerNamespace (NaviT env IO) Source # 
Instance details

Defined in Navi.NaviT

Methods

getNamespace :: NaviT env IO Namespace

localNamespace :: HasCallStack => (Namespace -> Namespace) -> NaviT env IO a -> NaviT env IO a

MonadSTM m => MonadSTM (NaviT e m) Source # 
Instance details

Defined in Navi.NaviT

Methods

atomically :: HasCallStack => STM a -> NaviT e m a

MonadTime (NaviT env IO) Source # 
Instance details

Defined in Navi.NaviT

MonadTerminal (NaviT env IO) Source # 
Instance details

Defined in Navi.NaviT

MonadThread m => MonadThread (NaviT e m) Source # 
Instance details

Defined in Navi.NaviT

MonadNotify (NaviT DBusEnv IO) Source # 
Instance details

Defined in Navi.NaviT

MonadNotify (NaviT NotifySendEnv IO) Source # 
Instance details

Defined in Navi.NaviT

MonadSystemInfo (NaviT env IO) Source # 
Instance details

Defined in Navi.NaviT

Methods

query :: HasCallStack => ServiceType result -> NaviT env IO result Source #

runNaviT :: NaviT env m a -> env -> m a Source #

Runs NaviT.