Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Pretty s
- type ColorText = ColorText
- align :: (ListLike s Char, IsString s) => [(Pretty s, Pretty s)] -> [Pretty s]
- align' :: (ListLike s Char, IsString s) => [(Pretty s, Maybe (Pretty s))] -> [(Pretty s, Pretty s)]
- alternations :: ListLike s c => (c -> Bool) -> s -> [s]
- background :: (Pretty ColorText -> Pretty ColorText) -> Pretty ColorText -> Pretty ColorText
- backticked :: IsString s => Pretty s -> Pretty s
- backticked' :: IsString s => Pretty s -> Pretty s -> Pretty s
- boxForkLeft :: forall s. (ListLike s Char, IsString s) => [Pretty s] -> [Pretty s]
- boxLeft :: forall s. (ListLike s Char, IsString s) => [Pretty s] -> [Pretty s]
- boxLeftM :: forall m s. (Monad m, ListLike s Char, IsString s) => [m (Pretty s)] -> [m (Pretty s)]
- boxRight :: forall s. (ListLike s Char, IsString s) => [Pretty s] -> [Pretty s]
- boxRightM :: forall m s. (Monad m, ListLike s Char, IsString s) => [m (Pretty s)] -> [m (Pretty s)]
- bulleted :: (Foldable f, ListLike s Char, IsString s) => f (Pretty s) -> Pretty s
- bracket :: (ListLike s Char, IsString s) => Pretty s -> Pretty s
- callout :: (ListLike s Char, IsString s) => Pretty s -> Pretty s -> Pretty s
- excerptSep :: IsString s => Maybe Int -> Pretty s -> [Pretty s] -> Pretty s
- excerptSep' :: IsString s => Maybe Int -> (Int -> Pretty s) -> Pretty s -> [Pretty s] -> Pretty s
- excerptColumn2 :: (ListLike s Char, IsString s) => Maybe Int -> [(Pretty s, Pretty s)] -> Pretty s
- excerptColumn2Headed :: (ListLike s Char, IsString s) => Maybe Int -> (Pretty s, Pretty s) -> [(Pretty s, Pretty s)] -> Pretty s
- warnCallout :: (ListLike s Char, IsString s) => Pretty s -> Pretty s
- blockedCallout :: (ListLike s Char, IsString s) => Pretty s -> Pretty s
- fatalCallout :: (ListLike s Char, IsString s) => Pretty s -> Pretty s
- okCallout :: (ListLike s Char, IsString s) => Pretty s -> Pretty s
- column2 :: (ListLike s Char, IsString s) => [(Pretty s, Pretty s)] -> Pretty s
- column2sep :: (ListLike s Char, IsString s) => Pretty s -> [(Pretty s, Pretty s)] -> Pretty s
- column2Header :: Pretty ColorText -> Pretty ColorText -> [(Pretty ColorText, Pretty ColorText)] -> Pretty ColorText
- column2M :: (Applicative m, ListLike s Char, IsString s) => [m (Pretty s, Pretty s)] -> m (Pretty s)
- column2UnzippedM :: forall m s. (ListLike s Char, IsString s, Monad m) => Pretty s -> [m (Pretty s)] -> [m (Pretty s)] -> m (Pretty s)
- column3 :: (ListLike s Char, IsString s) => [(Pretty s, Pretty s, Pretty s)] -> Pretty s
- column3M :: (ListLike s Char, IsString s, Monad m) => [m (Pretty s, Pretty s, Pretty s)] -> m (Pretty s)
- column3UnzippedM :: forall m s. (ListLike s Char, IsString s, Monad m) => Pretty s -> [m (Pretty s)] -> [m (Pretty s)] -> [m (Pretty s)] -> m (Pretty s)
- column3sep :: (ListLike s Char, IsString s) => Pretty s -> [(Pretty s, Pretty s, Pretty s)] -> Pretty s
- column3Header :: Pretty ColorText -> Pretty ColorText -> Pretty ColorText -> [(Pretty ColorText, Pretty ColorText, Pretty ColorText)] -> Pretty ColorText
- columnNHeader :: [Pretty ColorText] -> [[Pretty ColorText]] -> Pretty ColorText
- commas :: (Foldable f, IsString s) => f (Pretty s) -> Pretty s
- commented :: (Foldable f, ListLike s Char, IsString s) => f (Pretty s) -> Pretty s
- oxfordCommas :: (Foldable f, IsString s) => f (Pretty s) -> Pretty s
- oxfordCommasWith :: (Foldable f, IsString s) => Pretty s -> f (Pretty s) -> Pretty s
- plural :: Foldable f => f a -> Pretty ColorText -> Pretty ColorText
- dashed :: (Foldable f, ListLike s Char, IsString s) => f (Pretty s) -> Pretty s
- flatMap :: (s -> Pretty s2) -> Pretty s -> Pretty s2
- group :: Pretty s -> Pretty s
- hang' :: (ListLike s Char, IsString s) => Pretty s -> Pretty s -> Pretty s -> Pretty s
- hang :: (ListLike s Char, IsString s) => Pretty s -> Pretty s -> Pretty s
- hangUngrouped' :: (ListLike s Char, IsString s) => Pretty s -> Pretty s -> Pretty s -> Pretty s
- hangUngrouped :: (ListLike s Char, IsString s) => Pretty s -> Pretty s -> Pretty s
- softHang' :: (ListLike s Char, IsString s) => Pretty s -> Pretty s -> Pretty s -> Pretty s
- softHang :: (ListLike s Char, IsString s) => Pretty s -> Pretty s -> Pretty s
- softHangNoSpace' :: (ListLike s Char, IsString s) => Pretty s -> Pretty s -> Pretty s -> Pretty s
- indent :: (ListLike s Char, IsString s) => Pretty s -> Pretty s -> Pretty s
- indentAfterNewline :: (ListLike s Char, IsString s) => Pretty s -> Pretty s -> Pretty s
- indentN :: (ListLike s Char, IsString s) => Width -> Pretty s -> Pretty s
- indentNonEmptyN :: (ListLike s Char, IsString s) => Width -> Pretty s -> Pretty s
- indentNAfterNewline :: (ListLike s Char, IsString s) => Width -> Pretty s -> Pretty s
- invert :: Pretty ColorText -> Pretty ColorText
- isMultiLine :: Pretty s -> Bool
- isEmpty :: Eq s => IsString s => Pretty s -> Bool
- leftPad :: IsString s => Width -> Pretty s -> Pretty s
- lines :: (Foldable f, IsString s) => f (Pretty s) -> Pretty s
- linesNonEmpty :: (Foldable f, IsString s) => f (Pretty s) -> Pretty s
- linesSpaced :: (Foldable f, IsString s) => f (Pretty s) -> Pretty s
- lit :: (IsString s, ListLike s Char) => s -> Pretty s
- map :: ListLike s2 Char => (s -> s2) -> Pretty s -> Pretty s2
- mayColumn2 :: (ListLike s Char, IsString s) => [(Pretty s, Maybe (Pretty s))] -> Pretty s
- nest :: (ListLike s Char, IsString s) => Pretty s -> Pretty s -> Pretty s
- num :: (Show n, Num n, IsString s) => n -> Pretty s
- newline :: IsString s => Pretty s
- leftJustify :: (Eq s, ListLike s Char, IsString s) => [(Pretty s, a)] -> [(Pretty s, a)]
- lineSkip :: IsString s => Pretty s
- nonEmpty :: (Foldable f, IsString s) => f (Pretty s) -> [Pretty s]
- numbered :: (Foldable f, ListLike s Char, IsString s) => (Int -> Pretty s) -> f (Pretty s) -> Pretty s
- numberedColumn2ListFrom :: Foldable f => Int -> f (Pretty ColorText, Pretty ColorText) -> Pretty ColorText
- numberedColumn2Header :: (Foldable f, ListLike s Char, IsString s) => (Int -> Pretty s) -> f (Pretty s, Pretty s) -> Pretty s
- numberedColumnNHeader :: [Pretty ColorText] -> [[Pretty ColorText]] -> Pretty ColorText
- numberedList :: Foldable f => f (Pretty ColorText) -> Pretty ColorText
- numberedListFrom :: Foldable f => Int -> f (Pretty ColorText) -> Pretty ColorText
- orElse :: Pretty s -> Pretty s -> Pretty s
- orElses :: [Pretty s] -> Pretty s
- paragraphyText :: (ListLike s Char, IsString s) => Text -> Pretty s
- parenthesize :: IsString s => Pretty s -> Pretty s
- parenthesizeCommas :: (Foldable f, IsString s) => f (Pretty s) -> Pretty s
- parenthesizeIf :: IsString s => Bool -> Pretty s -> Pretty s
- render :: (Monoid s, IsString s) => Width -> Pretty s -> s
- renderUnbroken :: (Monoid s, IsString s) => Pretty s -> s
- rightPad :: IsString s => Width -> Pretty s -> Pretty s
- sep :: (Foldable f, IsString s) => Pretty s -> f (Pretty s) -> Pretty s
- sepNonEmpty :: (Foldable f, IsString s) => Pretty s -> f (Pretty s) -> Pretty s
- sepSpaced :: (Foldable f, IsString s) => Pretty s -> f (Pretty s) -> Pretty s
- shown :: (Show a, IsString s) => a -> Pretty s
- pshown :: (Show a, IsString s) => a -> Pretty s
- singleQuoted :: IsString s => Pretty s -> Pretty s
- singleQuoted' :: IsString s => Pretty s -> Pretty s -> Pretty s
- softbreak :: IsString s => Pretty s
- spaceIfBreak :: IsString s => Pretty s
- spaceIfNeeded :: Eq s => IsString s => Pretty s -> Pretty s -> Pretty s
- spaced :: (Foldable f, IsString s) => f (Pretty s) -> Pretty s
- spacedMap :: (Foldable f, IsString s) => (a -> Pretty s) -> f a -> Pretty s
- spacedTraverse :: (Traversable f, IsString s, Applicative m) => (a -> m (Pretty s)) -> f a -> m (Pretty s)
- spacesIfBreak :: IsString s => Int -> Pretty s
- string :: IsString s => String -> Pretty s
- surroundCommas :: (Foldable f, IsString s) => Pretty s -> Pretty s -> f (Pretty s) -> Pretty s
- syntaxToColor :: Pretty (SyntaxText' r) -> Pretty ColorText
- table :: (IsString s, ListLike s Char) => [[Pretty s]] -> Pretty s
- text :: IsString s => Text -> Pretty s
- toANSI :: Width -> Pretty ColorText -> String
- toAnsiUnbroken :: Pretty ColorText -> String
- toHTML :: String -> Width -> Pretty ColorText -> String
- toPlain :: Width -> Pretty ColorText -> String
- toPlainUnbroken :: Pretty ColorText -> String
- underline :: Pretty ColorText -> Pretty ColorText
- withSyntax :: Element r -> Pretty (SyntaxText' r) -> Pretty (SyntaxText' r)
- wrap :: (ListLike s Char, IsString s) => Pretty s -> Pretty s
- wrap' :: IsString s => (s -> [Pretty s]) -> Pretty s -> Pretty s
- wrapColumn2 :: (ListLike s Char, IsString s) => [(Pretty s, Pretty s)] -> Pretty s
- wrapString :: (ListLike s Char, IsString s) => String -> Pretty s
- black :: Pretty ColorText -> Pretty ColorText
- red :: Pretty ColorText -> Pretty ColorText
- green :: Pretty ColorText -> Pretty ColorText
- yellow :: Pretty ColorText -> Pretty ColorText
- blue :: Pretty ColorText -> Pretty ColorText
- purple :: Pretty ColorText -> Pretty ColorText
- cyan :: Pretty ColorText -> Pretty ColorText
- white :: Pretty ColorText -> Pretty ColorText
- hiBlack :: Pretty ColorText -> Pretty ColorText
- hiRed :: Pretty ColorText -> Pretty ColorText
- hiGreen :: Pretty ColorText -> Pretty ColorText
- hiYellow :: Pretty ColorText -> Pretty ColorText
- hiBlue :: Pretty ColorText -> Pretty ColorText
- hiPurple :: Pretty ColorText -> Pretty ColorText
- hiCyan :: Pretty ColorText -> Pretty ColorText
- hiWhite :: Pretty ColorText -> Pretty ColorText
- bold :: Pretty ColorText -> Pretty ColorText
- border :: (ListLike s Char, IsString s) => Width -> Pretty s -> Pretty s
- newtype Width = Width {
- widthToInt :: Int
- delta :: Pretty s -> Delta
- data Delta
Documentation
align' :: (ListLike s Char, IsString s) => [(Pretty s, Maybe (Pretty s))] -> [(Pretty s, Pretty s)] Source #
alternations :: ListLike s c => (c -> Bool) -> s -> [s] Source #
background :: (Pretty ColorText -> Pretty ColorText) -> Pretty ColorText -> Pretty ColorText Source #
backticked' :: IsString s => Pretty s -> Pretty s -> Pretty s Source #
Attach some punctuation after the closing backtick.
boxLeftM :: forall m s. (Monad m, ListLike s Char, IsString s) => [m (Pretty s)] -> [m (Pretty s)] Source #
boxRightM :: forall m s. (Monad m, ListLike s Char, IsString s) => [m (Pretty s)] -> [m (Pretty s)] Source #
excerptSep' :: IsString s => Maybe Int -> (Int -> Pretty s) -> Pretty s -> [Pretty s] -> Pretty s Source #
excerptColumn2 :: (ListLike s Char, IsString s) => Maybe Int -> [(Pretty s, Pretty s)] -> Pretty s Source #
excerptColumn2Headed :: (ListLike s Char, IsString s) => Maybe Int -> (Pretty s, Pretty s) -> [(Pretty s, Pretty s)] -> Pretty s Source #
column2sep :: (ListLike s Char, IsString s) => Pretty s -> [(Pretty s, Pretty s)] -> Pretty s Source #
column2Header :: Pretty ColorText -> Pretty ColorText -> [(Pretty ColorText, Pretty ColorText)] -> Pretty ColorText Source #
column2M :: (Applicative m, ListLike s Char, IsString s) => [m (Pretty s, Pretty s)] -> m (Pretty s) Source #
column2UnzippedM :: forall m s. (ListLike s Char, IsString s, Monad m) => Pretty s -> [m (Pretty s)] -> [m (Pretty s)] -> m (Pretty s) Source #
column3M :: (ListLike s Char, IsString s, Monad m) => [m (Pretty s, Pretty s, Pretty s)] -> m (Pretty s) Source #
column3UnzippedM :: forall m s. (ListLike s Char, IsString s, Monad m) => Pretty s -> [m (Pretty s)] -> [m (Pretty s)] -> [m (Pretty s)] -> m (Pretty s) Source #
column3sep :: (ListLike s Char, IsString s) => Pretty s -> [(Pretty s, Pretty s, Pretty s)] -> Pretty s Source #
column3Header :: Pretty ColorText -> Pretty ColorText -> Pretty ColorText -> [(Pretty ColorText, Pretty ColorText, Pretty ColorText)] -> Pretty ColorText Source #
columnNHeader :: [Pretty ColorText] -> [[Pretty ColorText]] -> Pretty ColorText Source #
Creates an aligned table with an arbitrary number of columns and column headers. Ensure all rows have the same number of columns or the alignment may be off.
hangUngrouped' :: (ListLike s Char, IsString s) => Pretty s -> Pretty s -> Pretty s -> Pretty s Source #
softHangNoSpace' :: (ListLike s Char, IsString s) => Pretty s -> Pretty s -> Pretty s -> Pretty s Source #
isMultiLine :: Pretty s -> Bool Source #
numbered :: (Foldable f, ListLike s Char, IsString s) => (Int -> Pretty s) -> f (Pretty s) -> Pretty s Source #
numberedColumn2ListFrom :: Foldable f => Int -> f (Pretty ColorText, Pretty ColorText) -> Pretty ColorText Source #
numberedColumn2Header :: (Foldable f, ListLike s Char, IsString s) => (Int -> Pretty s) -> f (Pretty s, Pretty s) -> Pretty s Source #
pshown :: (Show a, IsString s) => a -> Pretty s Source #
Like shown
, but uses a pretty layout (so long as the Show instance is derived).
spaceIfBreak :: IsString s => Pretty s Source #
spacedTraverse :: (Traversable f, IsString s, Applicative m) => (a -> m (Pretty s)) -> f a -> m (Pretty s) Source #
surroundCommas :: (Foldable f, IsString s) => Pretty s -> Pretty s -> f (Pretty s) -> Pretty s Source #
syntaxToColor :: Pretty (SyntaxText' r) -> Pretty ColorText Source #
withSyntax :: Element r -> Pretty (SyntaxText' r) -> Pretty (SyntaxText' r) Source #
Width | |
|