From fdf0f88dea4fa014c7ce080889ebf8379e09091d Mon Sep 17 00:00:00 2001 From: Marty Sluijtman Date: Mon, 31 Jul 2023 20:22:34 +0200 Subject: [PATCH] Paying attentioon helps --- app/Main.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Main.hs b/app/Main.hs index 8c66ad2..a1ce0de 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -47,8 +47,8 @@ parseArgs (Args t dir h v r c) = do mkIndex :: Bool -> FilePath -> FilePath -> IO () mkIndex True d l = do - line <- readFile $ d++"/"++l - putStrLn $ "=> " ++ path ++ (head . lines $ line) + line <- head . lines <$> readFile path + putStrLn $ "=> " ++ path ++ line where path = d++"/"++l++" " mkIndex False d l = putStrLn $ "=> " ++ path