diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/Debug.hs | 7 | ||||
-rw-r--r-- | app/Main.hs | 5 |
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 |