From 420b141a962ef3c542a975eb9f5b1ffb258e94c8 Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Sat, 23 Sep 2023 00:59:15 +0100 Subject: [PATCH] Add `blankLine` from Stack project --- ChangeLog.md | 1 + src/RIO/PrettyPrint.hs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog.md b/ChangeLog.md index 86a7145..3fb8fad 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -8,6 +8,7 @@ exception. * Add `prettyGeneric` and `prettyWith` for greater flexibility with pretty logging. +* Add `blankLine`. ## 0.1.6.0 diff --git a/src/RIO/PrettyPrint.hs b/src/RIO/PrettyPrint.hs index 0ca1b97..d1120cc 100644 --- a/src/RIO/PrettyPrint.hs +++ b/src/RIO/PrettyPrint.hs @@ -59,6 +59,7 @@ module RIO.PrettyPrint , displayMilliseconds , logLevelToStyle -- * Formatting utils + , blankLine , bulletedList , spacedBulletedList , mkBulletedList @@ -220,6 +221,10 @@ wordDocs = map fromString . words flow :: String -> StyleDoc flow = fillSep . wordDocs +-- | A blank line. +blankLine :: StyleDoc +blankLine = line <> line + -- | @debug message action@ brackets any output of the specified @action@ with -- an initial and final @message@ at log level 'LevelDebug'. The initial message -- is prefixed with the label @Start:@. The final message is prefixed with