aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2024-02-09 07:16:35 +0100
committerLibravatar Alexander Foremny <aforemny@posteo.de>2024-02-09 07:24:10 +0100
commit9e552700b1ac0d0812956a90845ddf6889c0218d (patch)
tree994858cd19dde2c574c6214106bedb6a2c0722cd /app
parent11969ba7aed38e6e35d51d52e8eab9b46a0c6203 (diff)
refactor `Debug`
Diffstat (limited to 'app')
-rw-r--r--app/Debug.hs7
-rw-r--r--app/Main.hs5
2 files changed, 7 insertions, 5 deletions
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