about summary refs log tree commit diff
path: root/users/Profpatsch/my-prelude/Pretty.hs
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2023-04-22T16·41+0200
committerProfpatsch <mail@profpatsch.de>2023-04-22T17·17+0000
commit285e045fc47b8aa9396602e003f5f712817d1a6e (patch)
tree317052b30c5a755f08aa6df47716c4311544ad93 /users/Profpatsch/my-prelude/Pretty.hs
parent04838db0a816ec917b9f7aed13096c599aeb9845 (diff)
feat(users/Profpatsch/my-prelude): add RunCommand.hs r/6103
Change-Id: I08231027a7363ba89006e4dcd510302599be7b4c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8499
Tested-by: BuildkiteCI
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Diffstat (limited to 'users/Profpatsch/my-prelude/Pretty.hs')
-rw-r--r--users/Profpatsch/my-prelude/Pretty.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/users/Profpatsch/my-prelude/Pretty.hs b/users/Profpatsch/my-prelude/Pretty.hs
index 8a58a5934e17..8046c83e459c 100644
--- a/users/Profpatsch/my-prelude/Pretty.hs
+++ b/users/Profpatsch/my-prelude/Pretty.hs
@@ -5,6 +5,7 @@ module Pretty
   ( -- * Pretty printing for error messages
     Err,
     printPretty,
+    showPretty,
     -- constructors hidden
     prettyErrs,
     message,
@@ -40,6 +41,9 @@ printPretty :: Show a => a -> IO ()
 printPretty a =
   a & pretty & (: []) & prettyErrs & stringToText & putStderrLn
 
+showPretty :: Show a => a -> Text
+showPretty a = a & pretty & (: []) & prettyErrs & stringToText
+
 -- | Display a list of 'Err's as a colored error message
 -- and abort the test.
 prettyErrs :: [Err] -> String