From 9e552700b1ac0d0812956a90845ddf6889c0218d Mon Sep 17 00:00:00 2001
From: Alexander Foremny <aforemny@posteo.de>
Date: Fri, 9 Feb 2024 07:16:35 +0100
Subject: refactor `Debug`

---
 app/Debug.hs | 7 +++++++
 app/Main.hs  | 5 -----
 2 files changed, 7 insertions(+), 5 deletions(-)
 create mode 100644 app/Debug.hs

(limited to 'app')

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
diff --git a/app/Main.hs b/app/Main.hs
index 9f04849..4ccf455 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -14,17 +14,12 @@ import Data.Maybe (fromMaybe, mapMaybe)
 import Data.Set qualified as S
 import Data.String (IsString (fromString))
 import Data.Text qualified as T
-import Debug.Trace (trace)
 import Store qualified as S
 import System.Directory (setCurrentDirectory)
 import System.FilePath ((</>))
 import Text.Megaparsec qualified as P
 import Text.Megaparsec.Char qualified as P
 import Text.Megaparsec.Char.Lexer qualified as P
-import Text.Printf (printf)
-
-debug :: Show a => String -> a -> a
-debug s x = trace (printf "%s: %s" s (show x)) x
 
 main :: IO ()
 main = do
-- 
cgit v1.2.3