avoid trying to find minimum element of empty map
This commit is contained in:
parent
1d3e60830d
commit
099c650292
1 changed files with 3 additions and 1 deletions
|
@ -338,7 +338,9 @@ withUnusedMaps a params = do
|
|||
|
||||
unusedSpec :: UnusedMap -> String -> [Int]
|
||||
unusedSpec m spec
|
||||
| spec == "all" = [fst (M.findMin m)..fst (M.findMax m)]
|
||||
| spec == "all" = if M.null m
|
||||
then []
|
||||
else [fst (M.findMin m)..fst (M.findMax m)]
|
||||
| "-" `isInfixOf` spec = range $ separate (== '-') spec
|
||||
| otherwise = maybe badspec (: []) (readish spec)
|
||||
where
|
||||
|
|
Loading…
Add table
Reference in a new issue