From 6faa17e39d7bf77df9aa199db09d52a600984271 Mon Sep 17 00:00:00 2001 From: jao Date: Mon, 11 May 2020 19:22:41 +0100 Subject: hlinting --- src/Xmobar/System/Utils.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Xmobar/System') diff --git a/src/Xmobar/System/Utils.hs b/src/Xmobar/System/Utils.hs index 33f221c..d532149 100644 --- a/src/Xmobar/System/Utils.hs +++ b/src/Xmobar/System/Utils.hs @@ -67,6 +67,6 @@ onSomeException io what = io `catch` \e -> do _ <- what e {-# INLINE (!!?) #-} safeIndex :: NE.NonEmpty a -> Int -> a -safeIndex xs index = case (NE.toList xs) !!? index of +safeIndex xs index = case NE.toList xs !!? index of Nothing -> NE.head xs Just value -> value -- cgit v1.2.3