-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Pretty-printing for RIO
--   
--   Combine RIO's log capabilities with pretty printing
@package rio-prettyprint
@version 0.1.1.0


-- | For the most part, the data constructors of <a>Style</a> do not clash
--   with other names. When they do, import the module qualified. For
--   example:
--   
--   <pre>
--   import qualified RIO.PrettyPrint.Types.PrettyPrint as PP
--   </pre>
module RIO.PrettyPrint.Types

-- | A style of rio-prettyprint's output.
data Style
Error :: Style
Warning :: Style
Info :: Style
Debug :: Style
OtherLevel :: Style
Good :: Style
Shell :: Style
File :: Style
Url :: Style
Dir :: Style
Recommendation :: Style
Current :: Style
Target :: Style
Module :: Style
PkgComponent :: Style
Secondary :: Style
Highlight :: Style

-- | Style specifications indexed by the style.
type Styles = Array Style StyleSpec

-- | A style specification, pairing its 'key' with the corresponding list
--   of <a>SGR</a> codes.
type StyleSpec = (Text, [SGR])
instance GHC.Show.Show RIO.PrettyPrint.Types.Style
instance GHC.Classes.Ord RIO.PrettyPrint.Types.Style
instance GHC.Arr.Ix RIO.PrettyPrint.Types.Style
instance GHC.Classes.Eq RIO.PrettyPrint.Types.Style
instance GHC.Enum.Enum RIO.PrettyPrint.Types.Style
instance GHC.Enum.Bounded RIO.PrettyPrint.Types.Style
instance GHC.Base.Semigroup RIO.PrettyPrint.Types.Style

module RIO.PrettyPrint.DefaultStyles

-- | Default styles for rio-prettyprint output.
defaultStyles :: Styles

module RIO.PrettyPrint.StylesUpdate

-- | Updates to <tt>Styles</tt>
newtype StylesUpdate
StylesUpdate :: [(Style, StyleSpec)] -> StylesUpdate
[stylesUpdate] :: StylesUpdate -> [(Style, StyleSpec)]

-- | Parse a string that is a colon-delimited sequence of key=value, where
--   <tt>key</tt> is a style name and <tt>value</tt> is a
--   semicolon-delimited list of <tt>ANSI</tt> SGR (Select Graphic
--   Rendition) control codes (in decimal). Keys that are not present in
--   <a>defaultStyles</a> are ignored. Items in the semicolon-delimited
--   list that are not recognised as valid control codes are ignored.
parseStylesUpdateFromString :: String -> StylesUpdate

-- | Environment values with a styles update.
class HasStylesUpdate env
stylesUpdateL :: HasStylesUpdate env => Lens' env StylesUpdate
instance GHC.Show.Show RIO.PrettyPrint.StylesUpdate.StylesUpdate
instance GHC.Classes.Eq RIO.PrettyPrint.StylesUpdate.StylesUpdate
instance RIO.PrettyPrint.StylesUpdate.HasStylesUpdate RIO.PrettyPrint.StylesUpdate.StylesUpdate
instance GHC.Base.Semigroup RIO.PrettyPrint.StylesUpdate.StylesUpdate
instance GHC.Base.Monoid RIO.PrettyPrint.StylesUpdate.StylesUpdate
instance Data.Aeson.Types.FromJSON.FromJSON RIO.PrettyPrint.StylesUpdate.StylesUpdate


-- | This module re-exports some of the interface for
--   <a>Text.PrettyPrint.Annotated.Leijen</a> along with additional
--   definitions useful for stack.
--   
--   It defines a <a>Monoid</a> instance for <a>Doc</a>.
module Text.PrettyPrint.Leijen.Extended
class Pretty a
pretty :: Pretty a => a -> StyleDoc
pretty :: (Pretty a, Show a) => a -> StyleDoc

-- | A document annotated by a style
data StyleDoc

-- | A style annotation.
newtype StyleAnn
StyleAnn :: Maybe Style -> StyleAnn
displayAnsi :: (Pretty a, HasLogFunc env, HasStylesUpdate env, MonadReader env m, HasCallStack) => Int -> a -> m Utf8Builder
displayPlain :: (Pretty a, HasLogFunc env, HasStylesUpdate env, MonadReader env m, HasCallStack) => Int -> a -> m Utf8Builder
renderDefault :: Int -> Doc a -> SimpleDoc a
nest :: Int -> StyleDoc -> StyleDoc
line :: StyleDoc
linebreak :: StyleDoc
group :: StyleDoc -> StyleDoc
softline :: StyleDoc
softbreak :: StyleDoc
align :: StyleDoc -> StyleDoc
hang :: Int -> StyleDoc -> StyleDoc
indent :: Int -> StyleDoc -> StyleDoc
encloseSep :: StyleDoc -> StyleDoc -> StyleDoc -> [StyleDoc] -> StyleDoc
(<+>) :: StyleDoc -> StyleDoc -> StyleDoc
hsep :: [StyleDoc] -> StyleDoc
vsep :: [StyleDoc] -> StyleDoc
fillSep :: [StyleDoc] -> StyleDoc
sep :: [StyleDoc] -> StyleDoc
hcat :: [StyleDoc] -> StyleDoc
vcat :: [StyleDoc] -> StyleDoc
fillCat :: [StyleDoc] -> StyleDoc
cat :: [StyleDoc] -> StyleDoc
punctuate :: StyleDoc -> [StyleDoc] -> [StyleDoc]
fill :: Int -> StyleDoc -> StyleDoc
fillBreak :: Int -> StyleDoc -> StyleDoc
enclose :: StyleDoc -> StyleDoc -> StyleDoc -> StyleDoc
squotes :: StyleDoc -> StyleDoc
dquotes :: StyleDoc -> StyleDoc
parens :: StyleDoc -> StyleDoc
angles :: StyleDoc -> StyleDoc
braces :: StyleDoc -> StyleDoc
brackets :: StyleDoc -> StyleDoc
annotate :: StyleAnn -> StyleDoc -> StyleDoc
noAnnotate :: StyleDoc -> StyleDoc
styleAnn :: Style -> StyleDoc -> StyleDoc
instance GHC.Classes.Ord Text.PrettyPrint.Leijen.Extended.SGRTag
instance GHC.Classes.Eq Text.PrettyPrint.Leijen.Extended.SGRTag
instance GHC.Base.Monoid Text.PrettyPrint.Leijen.Extended.AnsiAnn
instance GHC.Base.Semigroup Text.PrettyPrint.Leijen.Extended.AnsiAnn
instance GHC.Show.Show Text.PrettyPrint.Leijen.Extended.AnsiAnn
instance GHC.Classes.Eq Text.PrettyPrint.Leijen.Extended.AnsiAnn
instance Data.String.IsString Text.PrettyPrint.Leijen.Extended.StyleDoc
instance GHC.Base.Semigroup Text.PrettyPrint.Leijen.Extended.StyleAnn
instance GHC.Show.Show Text.PrettyPrint.Leijen.Extended.StyleAnn
instance GHC.Classes.Eq Text.PrettyPrint.Leijen.Extended.StyleAnn
instance Text.PrettyPrint.Leijen.Extended.Pretty Text.PrettyPrint.Leijen.Extended.StyleDoc
instance Text.PrettyPrint.Leijen.Extended.Pretty (Path.Internal.Path b Path.Posix.File)
instance Text.PrettyPrint.Leijen.Extended.Pretty (Path.Internal.Path b Path.Posix.Dir)
instance Text.PrettyPrint.Leijen.Extended.Pretty Distribution.ModuleName.ModuleName
instance GHC.Base.Semigroup Text.PrettyPrint.Leijen.Extended.StyleDoc
instance GHC.Base.Monoid Text.PrettyPrint.Leijen.Extended.StyleDoc
instance GHC.Base.Monoid Text.PrettyPrint.Leijen.Extended.StyleAnn

module RIO.PrettyPrint
class (HasLogFunc env, HasStylesUpdate env) => HasTerm env
useColorL :: HasTerm env => Lens' env Bool
termWidthL :: HasTerm env => Lens' env Int

-- | Environment values with a styles update.
class HasStylesUpdate env
stylesUpdateL :: HasStylesUpdate env => Lens' env StylesUpdate
displayPlain :: (Pretty a, HasLogFunc env, HasStylesUpdate env, MonadReader env m, HasCallStack) => Int -> a -> m Utf8Builder
displayWithColor :: (HasTerm env, Pretty a, MonadReader env m, HasCallStack) => a -> m Utf8Builder
prettyDebug :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => StyleDoc -> m ()
prettyInfo :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => StyleDoc -> m ()
prettyNote :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => StyleDoc -> m ()
prettyWarn :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => StyleDoc -> m ()
prettyError :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => StyleDoc -> m ()
prettyWarnNoIndent :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => StyleDoc -> m ()
prettyErrorNoIndent :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => StyleDoc -> m ()
prettyDebugL :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => [StyleDoc] -> m ()
prettyInfoL :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => [StyleDoc] -> m ()
prettyNoteL :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => [StyleDoc] -> m ()
prettyWarnL :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => [StyleDoc] -> m ()
prettyErrorL :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => [StyleDoc] -> m ()
prettyWarnNoIndentL :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => [StyleDoc] -> m ()
prettyErrorNoIndentL :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => [StyleDoc] -> m ()
prettyDebugS :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => String -> m ()
prettyInfoS :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => String -> m ()
prettyNoteS :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => String -> m ()
prettyWarnS :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => String -> m ()
prettyErrorS :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => String -> m ()
prettyWarnNoIndentS :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => String -> m ()
prettyErrorNoIndentS :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m) => String -> m ()

-- | Annotate a <a>StyleDoc</a> with a <a>Style</a>.
style :: Style -> StyleDoc -> StyleDoc
displayMilliseconds :: Double -> StyleDoc

-- | The <a>Style</a> intended to be associated with a <a>LogLevel</a>.
logLevelToStyle :: LogLevel -> Style

-- | Display a bulleted list of <a>StyleDoc</a>.
bulletedList :: [StyleDoc] -> StyleDoc

-- | Display a bulleted list of <a>StyleDoc</a> with a blank line between
--   each.
spacedBulletedList :: [StyleDoc] -> StyleDoc
debugBracket :: (HasCallStack, HasTerm env, MonadReader env m, MonadIO m, MonadUnliftIO m) => StyleDoc -> m a -> m a
class Pretty a
pretty :: Pretty a => a -> StyleDoc
pretty :: (Pretty a, Show a) => a -> StyleDoc

-- | A document annotated by a style
data StyleDoc

-- | A style annotation.
newtype StyleAnn
StyleAnn :: Maybe Style -> StyleAnn
nest :: Int -> StyleDoc -> StyleDoc
line :: StyleDoc
linebreak :: StyleDoc
group :: StyleDoc -> StyleDoc
softline :: StyleDoc
softbreak :: StyleDoc
align :: StyleDoc -> StyleDoc
hang :: Int -> StyleDoc -> StyleDoc
indent :: Int -> StyleDoc -> StyleDoc
encloseSep :: StyleDoc -> StyleDoc -> StyleDoc -> [StyleDoc] -> StyleDoc
(<+>) :: StyleDoc -> StyleDoc -> StyleDoc
hsep :: [StyleDoc] -> StyleDoc
vsep :: [StyleDoc] -> StyleDoc
fillSep :: [StyleDoc] -> StyleDoc
sep :: [StyleDoc] -> StyleDoc
hcat :: [StyleDoc] -> StyleDoc
vcat :: [StyleDoc] -> StyleDoc
fillCat :: [StyleDoc] -> StyleDoc
cat :: [StyleDoc] -> StyleDoc
punctuate :: StyleDoc -> [StyleDoc] -> [StyleDoc]
fill :: Int -> StyleDoc -> StyleDoc
fillBreak :: Int -> StyleDoc -> StyleDoc
enclose :: StyleDoc -> StyleDoc -> StyleDoc -> StyleDoc
squotes :: StyleDoc -> StyleDoc
dquotes :: StyleDoc -> StyleDoc
parens :: StyleDoc -> StyleDoc
angles :: StyleDoc -> StyleDoc
braces :: StyleDoc -> StyleDoc
brackets :: StyleDoc -> StyleDoc

-- | Use after a label and before the rest of what's being labelled for
--   consistent spacing<i>indenting</i>etc.
--   
--   For example this is used after "Warning:" in warning messages.
indentAfterLabel :: StyleDoc -> StyleDoc

-- | Make a <tt>Doc</tt> from each word in a <a>String</a>
wordDocs :: String -> [StyleDoc]

-- | Wordwrap a <a>String</a>
flow :: String -> StyleDoc

-- | A style of rio-prettyprint's output.
data Style
Error :: Style
Warning :: Style
Info :: Style
Debug :: Style
OtherLevel :: Style
Good :: Style
Shell :: Style
File :: Style
Url :: Style
Dir :: Style
Recommendation :: Style
Current :: Style
Target :: Style
Module :: Style
PkgComponent :: Style
Secondary :: Style
Highlight :: Style
