Skip to content

Commit 13dbda2

Browse files
committed
Preserve previous behaviour
evaluate . rnf should blow up it words aren't as expected
1 parent 45d6bbe commit 13dbda2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

precompute-fileinfo/src/Main.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,11 @@ readMap fp =
175175
where
176176
mapFromParseEntry :: [String] -> Map MD5 (SHA256, Length)
177177
mapFromParseEntry mapLines = Map.fromList
178-
[(md5, (sha256, read len)) | [md5, sha256, len] <- words <$> mapLines]
178+
[ case ws of
179+
[md5, sha256, len] -> (md5, (sha256, read len))
180+
_ -> (unwords ws, undefined)
181+
| ws <- words <$> mapLines
182+
]
179183

180184
{-------------------------------------------------------------------------------
181185
Auxiliary

0 commit comments

Comments
 (0)