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