Make 'nix flake check' work
This commit is contained in:
parent
da3b61b467
commit
7a69fb2363
6 changed files with 27 additions and 20 deletions
|
|
@ -7,9 +7,9 @@ module HCat.Internal where
|
|||
-- Right "foo"
|
||||
parseArgs :: [String] -> Either String FilePath
|
||||
parseArgs args = case args of
|
||||
[] -> Left "No filename given!"
|
||||
[arg] -> Right arg
|
||||
_ -> Left "Only a single file is supported"
|
||||
[] -> Left "No filename given!"
|
||||
[arg] -> Right arg
|
||||
_ -> Left "Only a single file is supported"
|
||||
|
||||
-- | @chunksOf n@ splits a list into chunks of at most @n@ items.
|
||||
--
|
||||
|
|
@ -24,7 +24,7 @@ parseArgs args = case args of
|
|||
chunksOf :: Int -> [a] -> [[a]]
|
||||
chunksOf _ [] = []
|
||||
chunksOf n xs@(_ : _)
|
||||
| n <= 0 = []
|
||||
| otherwise =
|
||||
let (chunk, rest) = splitAt n xs
|
||||
in chunk : chunksOf n rest
|
||||
| n <= 0 = []
|
||||
| otherwise =
|
||||
let (chunk, rest) = splitAt n xs
|
||||
in chunk : chunksOf n rest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue