Skip to content

Commit

Permalink
Preserve previous behaviour
Browse files Browse the repository at this point in the history
evaluate . rnf should blow up it words aren't as expected
  • Loading branch information
philderbeast committed Jan 23, 2024
1 parent 713f669 commit 6b93ec9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion precompute-fileinfo/src/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,11 @@ readMap fp =
where
mapFromParseEntry :: [String] -> Map MD5 (SHA256, Length)
mapFromParseEntry mapLines = Map.fromList
[(md5, (sha256, read len)) | [md5, sha256, len] <- words <$> mapLines]
[ case ws of
[md5, sha256, len] -> (md5, (sha256, read len))
_ -> (unwords ws, undefined)
| ws <- words <$> mapLines
]

{-------------------------------------------------------------------------------
Auxiliary
Expand Down

0 comments on commit 6b93ec9

Please sign in to comment.