From 9e552700b1ac0d0812956a90845ddf6889c0218d Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Fri, 9 Feb 2024 07:16:35 +0100 Subject: refactor `Debug` --- app/Debug.hs | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 app/Debug.hs (limited to 'app/Debug.hs') diff --git a/app/Debug.hs b/app/Debug.hs new file mode 100644 index 0000000..b28a967 --- /dev/null +++ b/app/Debug.hs @@ -0,0 +1,7 @@ +module Debug where + +import Debug.Trace (trace) +import Text.Printf (printf) + +debug :: Show a => String -> a -> a +debug s x = trace (printf "%s: %s" s (show x)) x -- cgit v1.2.3