From 8a005526cc5b1379b0c651a0505f7110c6bf0d8e Mon Sep 17 00:00:00 2001 From: "Joseph C. Sible" Date: Sat, 1 Feb 2020 23:02:10 -0500 Subject: [PATCH] Use drop instead of splitAt since we only use the second half --- src/ShellCheck/Fixer.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ShellCheck/Fixer.hs b/src/ShellCheck/Fixer.hs index a69616e..16bdd98 100644 --- a/src/ShellCheck/Fixer.hs +++ b/src/ShellCheck/Fixer.hs @@ -200,7 +200,7 @@ doReplace start end o r = let si = fromIntegral (start-1) ei = fromIntegral (end-1) (x, xs) = splitAt si o - (y, z) = splitAt (ei - si) xs + z = drop (ei - si) xs in x ++ r ++ z