diff options
Diffstat (limited to 'Logs/Unused.hs')
-rw-r--r-- | Logs/Unused.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Logs/Unused.hs b/Logs/Unused.hs index 9f1278dd0..bef78a992 100644 --- a/Logs/Unused.hs +++ b/Logs/Unused.hs @@ -62,11 +62,12 @@ withUnusedMaps a params = do unusedSpec :: String -> [Int] unusedSpec spec | "-" `isInfixOf` spec = range $ separate (== '-') spec - | otherwise = catMaybes [readish spec] + | otherwise = maybe badspec (: []) (readish spec) where range (a, b) = case (readish a, readish b) of (Just x, Just y) -> [x..y] - _ -> [] + _ -> badspec + badspec = error $ "Expected number or range, not \"" ++ spec ++ "\"" {- Start action for unused content. Finds the number in the maps, and - calls either of 3 actions, depending on the type of unused file. -} |