Skip to content

Commit 7ecb32c

Browse files
committed
Resolve non-exhaustive pattern match warnings
1 parent 81d763c commit 7ecb32c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/ResourceLimit.hs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ main = do
1010
setResourceLimit ResourceCPUTime
1111
(ResourceLimits (ResourceLimit soft) (ResourceLimit hard))
1212
r <- getResourceLimit ResourceCPUTime
13-
let (ResourceLimit s) = softLimit r
14-
let (ResourceLimit h) = hardLimit r
15-
s @?= soft
16-
h @?= hard
13+
soft @?= case softLimit r of
14+
ResourceLimit l -> l
15+
_ -> 0
16+
hard @?= case hardLimit r of
17+
ResourceLimit l -> l
18+
_ -> 0

0 commit comments

Comments
 (0)