From 9acc8fcb533c544141725c14cfcbbd235f991ec3 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Sun, 23 Dec 2018 11:08:48 -0800 Subject: [PATCH] Fix semigroup incompatibility --- src/ShellCheck/Fixer.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ShellCheck/Fixer.hs b/src/ShellCheck/Fixer.hs index 75b6fdd..78abfeb 100644 --- a/src/ShellCheck/Fixer.hs +++ b/src/ShellCheck/Fixer.hs @@ -2,6 +2,7 @@ module ShellCheck.Fixer (applyFix , replaceMultiLines, Ranged(..)) where import ShellCheck.Interface import Data.List +import Data.Semigroup -- The Ranged class is used for types that has a start and end position. class Ranged a where @@ -33,6 +34,7 @@ instance Ranged Fix where -- The Monoid instance for Fix merges replacements that do not overlap. instance Monoid Fix where mempty = newFix + mappend = (<>) instance Semigroup Fix where f1 <> f2 = if overlap f1 f2 then f1 else newFix {