Skip to content

Commit f3f5c0a

Browse files
committed
Satisfy -Wincomplete-uni-patterns with toTarPath
1 parent 3486f36 commit f3f5c0a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

hackage-security/tests/TestSuite.hs

+4-4
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ testRepoIndex inMemRepo repo = do
238238
length (directoryEntries dir1) @?= 0
239239

240240
now <- getCurrentTime
241-
inMemRepoSetIndex inMemRepo now [testEntry1]
241+
inMemRepoSetIndex inMemRepo now testEntries1
242242

243243
assertEqual "B" HasUpdates =<< checkForUpdates repo =<< checkExpiry
244244
dir2 <- getDirectory repo
@@ -264,9 +264,9 @@ testRepoIndex inMemRepo repo = do
264264
_ -> fail "unexpected index entry content"
265265
_ -> fail "unexpected index path"
266266

267-
testEntry1 = Tar.fileEntry path testEntrycontent
268-
where
269-
Right path = Tar.toTarPath False "foo/preferred-versions"
267+
testEntries1 :: [Tar.GenEntry Tar.TarPath linkTarget]
268+
testEntries1 = either (const []) (pure . (`Tar.fileEntry` testEntrycontent))
269+
(Tar.toTarPath False "foo/preferred-versions")
270270
testEntrycontent = BS.pack "foo >= 1"
271271
testEntryIndexFile = IndexPkgPrefs (mkPackageName "foo")
272272

0 commit comments

Comments
 (0)