Move code to Internal module and add tests

This commit is contained in:
Alexander Kobjolke 2023-08-15 19:47:37 +02:00
parent 2ac76cb650
commit ace38dcebc
6 changed files with 89 additions and 15 deletions

8
src/HCat/Internal.hs Normal file
View file

@ -0,0 +1,8 @@
-- | Internal module in order to facilitate testability.
module HCat.Internal where
parseArgs :: [String] -> Either String FilePath
parseArgs args = case args of
[] -> Left "No filename given!"
[arg] -> Right arg
_ -> Left "Only a single file is supported"