stack-0.1.0.0: The Haskell Tool Stack

Safe HaskellNone
LanguageHaskell2010

Stack.Types.StackT

Description

The monad used for the command-line executable stack.

Synopsis

Documentation

data StackT config m a Source

The monad used for the executable stack.

Instances

MonadBase b m => MonadBase b (StackT config m) 
MonadBaseControl b m => MonadBaseControl b (StackT config m) 
MonadTrans (StackT config) 
MonadTransControl (StackT config) 
Monad m => MonadReader (Env config) (StackT config m) 
Monad m => Monad (StackT config m) 
Functor m => Functor (StackT config m) 
Applicative m => Applicative (StackT config m) 
MonadIO m => MonadIO (StackT config m) 
MonadThrow m => MonadThrow (StackT config m) 
MonadMask m => MonadMask (StackT config m) 
MonadCatch m => MonadCatch (StackT config m) 
MonadIO m => MonadLogger (StackT config m)

Takes the configured log level into account.

type StT (StackT config) a = StT (ReaderT (Env config)) a 
type StM (StackT config m) a = ComposeSt (StackT config) m a 

data StackLoggingT m a Source

The monad used for logging in the executable stack before anything has been initialized.

Instances

MonadTrans StackLoggingT 
MonadTransControl StackLoggingT 
MonadBase b m => MonadBase b (StackLoggingT m) 
MonadBaseControl b m => MonadBaseControl b (StackLoggingT m) 
Monad m => Monad (StackLoggingT m) 
Functor m => Functor (StackLoggingT m) 
Applicative m => Applicative (StackLoggingT m) 
MonadIO m => MonadIO (StackLoggingT m) 
MonadThrow m => MonadThrow (StackLoggingT m) 
MonadMask m => MonadMask (StackLoggingT m) 
MonadCatch m => MonadCatch (StackLoggingT m) 
MonadIO m => MonadLogger (StackLoggingT m)

Takes the configured log level into account.

Monad m => MonadReader (LogLevel, Manager, Sticky) (StackLoggingT m) 
type StT StackLoggingT a = StT (ReaderT (LogLevel, Manager, Sticky)) a 
type StM (StackLoggingT m) a = ComposeSt StackLoggingT m a 

runStackT :: (MonadIO m, MonadBaseControl IO m) => Manager -> LogLevel -> config -> Bool -> StackT config m a -> m a Source

Run a Stack action.

runStackLoggingT :: MonadIO m => Manager -> LogLevel -> Bool -> StackLoggingT m a -> m a Source

Run the logging monad.

newTLSManager :: MonadIO m => m Manager Source

Convenience for getting a Manager

logSticky :: Q Exp Source

Write a "sticky" line to the terminal. Any subsequent lines will overwrite this one, and that same line will be repeated below again. In other words, the line sticks at the bottom of the output forever. Running this function again will replace the sticky line with a new sticky line. When you want to get rid of the sticky line, run logStickyDone.

logStickyDone :: Q Exp Source

This will print out the given message with a newline and disable any further stickiness of the line until a new call to logSticky happens.

It might be better at some point to have a runSticky function that encompasses the logSticky->logStickyDone pairing.