Safe Haskell | None |
---|---|
Language | Haskell2010 |
An App
monad with its operations.
Synopsis
- newtype Common = Common Void
- newtype StartingUp = StartingUp Void
- newtype Forked = Forked Void
- type family StateOf a where ...
- newtype App stage a = App {}
- runApp :: Runtime -> StateOf stage -> App stage a -> IO a
- liftIO :: IO a -> App stage a
- get :: App stage (StateOf stage)
- put :: StateOf stage -> App stage ()
- modify :: (StateOf stage -> StateOf stage) -> App stage ()
- getRuntime :: App stage Runtime
- getNonce :: App StartingUp Int
- liftStartingUp :: App StartingUp a -> BarSettings -> App Common a
- runAppForked :: BarRuntime -> App Forked () -> App Common ()
- forkApp :: App stage () -> App stage ()
- exit :: Int -> Text -> App stage a
- randomSuffix :: App stage String
- checkBinary :: String -> App stage Bool
- echoLines :: [Text] -> App stage ()
- echo :: Text -> App stage ()
- highlight :: Text -> App stage Text
- explained :: IO a -> App stage a
- timely :: Int -> App stage () -> App stage ()
- waitForExit :: App a ()
App execution stages
Three newtypes below are used as tags to show in which stage of execution the app currently is.
newtype StartingUp Source #
At this stage, the app initializes Source
s and launches event listeners
that read their corresponding named pipes and handle automata state transitions.
See also: StartingUp
.
getRuntime :: App stage Runtime Source #
liftStartingUp :: App StartingUp a -> BarSettings -> App Common a Source #
runAppForked :: BarRuntime -> App Forked () -> App Common () Source #
randomSuffix :: App stage String Source #
waitForExit :: App a () Source #