dzen-dhall-1.0.2: Configure dzen2 bars in Dhall language

Safe HaskellNone
LanguageHaskell2010

DzenDhall.App

Contents

Description

An App monad with its operations.

Synopsis

App execution stages

Three newtypes below are used as tags to show in which stage of execution the app currently is.

newtype Common Source #

At this stage, App performs config validation, runs startup/initalization, and forks threads that later update bar outputs.

See also: Run.

Constructors

Common Void 

newtype StartingUp Source #

At this stage, the app initializes Sources and launches event listeners that read their corresponding named pipes and handle automata state transitions.

See also: StartingUp.

Constructors

StartingUp Void 

newtype Forked Source #

At this stage, the app only updates bar outputs.

See also: Forked.

Constructors

Forked Void 

type family StateOf a where ... Source #

Maps app execution stages to app states.

newtype App stage a Source #

Runtime is read-only; mutable state type depends on the current stage of execution of the App.

Constructors

App 

Fields

Instances
Monad (App stage) Source # 
Instance details

Defined in DzenDhall.App

Methods

(>>=) :: App stage a -> (a -> App stage b) -> App stage b #

(>>) :: App stage a -> App stage b -> App stage b #

return :: a -> App stage a #

fail :: String -> App stage a #

Functor (App stage) Source # 
Instance details

Defined in DzenDhall.App

Methods

fmap :: (a -> b) -> App stage a -> App stage b #

(<$) :: a -> App stage b -> App stage a #

Applicative (App stage) Source # 
Instance details

Defined in DzenDhall.App

Methods

pure :: a -> App stage a #

(<*>) :: App stage (a -> b) -> App stage a -> App stage b #

liftA2 :: (a -> b -> c) -> App stage a -> App stage b -> App stage c #

(*>) :: App stage a -> App stage b -> App stage b #

(<*) :: App stage a -> App stage b -> App stage a #

runApp :: Runtime -> StateOf stage -> App stage a -> IO a Source #

liftIO :: IO a -> App stage a Source #

get :: App stage (StateOf stage) Source #

put :: StateOf stage -> App stage () Source #

modify :: (StateOf stage -> StateOf stage) -> App stage () Source #

forkApp :: App stage () -> App stage () Source #

exit :: Int -> Text -> App stage a Source #

echoLines :: [Text] -> App stage () Source #

echo :: Text -> App stage () Source #

explained :: IO a -> App stage a Source #

Apply Dhall.detailed settings.

timely :: Int -> App stage () -> App stage () Source #