From caf9da01bf6663854c25fc2cc6457aa4fe7b88cf Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Thu, 19 Apr 2018 12:07:25 +0200 Subject: Fix warnings --- Utility.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Utility.hs') diff --git a/Utility.hs b/Utility.hs index a160cb7..e2c245d 100644 --- a/Utility.hs +++ b/Utility.hs @@ -18,6 +18,8 @@ setcompareBy p a@(x:xs) b = length a == length b && setcompareBy p xs (deleteBy deleteIndex :: Int -> [a] -> [a] deleteIndex 0 (_:xs) = xs deleteIndex i (x:xs) | i > 0 = x : deleteIndex (i-1) xs + | otherwise = error "Negative index in deleteIndex" +deleteIndex _ [] = error "Too high index in deleteIndex" fromLeft :: Either a b -> a fromLeft (Left a) = a -- cgit v1.2.3-54-g00ecf