| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Refurb.Run.Internal
Description
Module containing shared types and functions used for implementing the various commands.
- data Context = Context {}
- type MonadRefurb m = (MonadBaseControl IO m, MonadMask m, MonadReader Context m, MonadLogger m, MonadLoggerIO m)
- optionallyColorM :: MonadRefurb m => m (Doc -> Doc)
- optionallyColoredM :: MonadRefurb m => m (Doc -> m ())
- migrationResultDoc :: MigrationResult -> Doc
Documentation
Reader context for all command execution which contains the command line options, database connection and connection information, and known migrations.
Constructors
| Context | |
Fields
| |
type MonadRefurb m = (MonadBaseControl IO m, MonadMask m, MonadReader Context m, MonadLogger m, MonadLoggerIO m) Source #
Constraint of actions for command execution, including access to the Context, logging, and underlying IO.
optionallyColorM :: MonadRefurb m => m (Doc -> Doc) Source #
Given the configuration implicitly available to MonadRefurb, produce a function which possibly strips ANSI colorization from a Doc if the user
requested colorless output.
optionallyColoredM :: MonadRefurb m => m (Doc -> m ()) Source #
Given the configuration implicitly available to MonadRefurb, produce a function which emits a Doc on stdout that is colored unless the user requested
colorless output.
migrationResultDoc :: MigrationResult -> Doc Source #
Produce a colorized Doc with success or failure, based on which MigrationResult value was passed.