pa-pretty-0.1.1.0: Some pretty-printing helpers
Safe HaskellSafe-Inferred
LanguageGHC2021

Pretty

Synopsis

Pretty printing for error messages

data Err Source #

Small DSL for pretty-printing errors

showPretty :: Show a => a -> Text Source #

printPretty :: Show a => a -> IO () Source #

Print any Showable type to stderr, formatted nicely and in color. Very helpful for debugging.

prettyErrs :: [Err] -> String Source #

Display a list of Errs as a colored error message and abort the test.

message :: Text -> Err Source #

Plain message to display, as Text

messageString :: String -> Err Source #

Plain message to display, as String

pretty :: Show a => a -> Err Source #

Any Showable to pretty print

prettyString :: String -> Err Source #

Pretty print a String that was produced by show