about summary refs log tree commit diff
path: root/users/Profpatsch/my-prelude/Pretty.hs
diff options
context:
space:
mode:
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