@@ -61,9 +61,6 @@ where
6161
6262import Control.DeepSeq
6363import Data.Bits
64−#if !(MIN_VERSION_base(4,11,0))
65−import Data.Semigroup
66−#endif
6764import Data.Text (Text)
6865import Data.Word
6966import GHC.Generics
@@ -116,19 +113,6 @@ data Attr = Attr
116113-- Then the foreground color encoded into 8 bits.
117114-- Then the background color encoded into 8 bits.
118115
119−instance Semigroup Attr where
120− attr0 <> attr1 =
121− Attr ( attrStyle attr0 <> attrStyle attr1 )
122− ( attrForeColor attr0 <> attrForeColor attr1 )
123− ( attrBackColor attr0 <> attrBackColor attr1 )
124− ( attrURL attr0 <> attrURL attr1 )
125−
126−instance Monoid Attr where
127− mempty = Attr mempty mempty mempty mempty
128−#if !(MIN_VERSION_base(4,11,0))
129− mappend = (<>)
130−#endif
131−
132116-- | Specifies the display attributes such that the final style and
133117-- color values do not depend on the previously applied display
134118-- attribute. The display attributes can still depend on the terminal's
@@ -151,17 +135,6 @@ instance (NFData v) => NFData (MaybeDefault v) where
151135 rnf KeepCurrent = ()
152136 rnf (SetTo v) = rnf v
153137
154−instance Semigroup (MaybeDefault v) where
155− _ <> v@(SetTo _) = v
156− x <> KeepCurrent = x
157− _ <> Default = Default
158−
159−instance Monoid ( MaybeDefault v ) where
160− mempty = KeepCurrent
161−#if !(MIN_VERSION_base(4,11,0))
162− mappend = (<>)
163−#endif
164−
165138-- | Styles are represented as an 8 bit word. Each bit in the word is 1
166139-- if the style attribute assigned to that bit should be applied and 0
167140-- if the style attribute should not be applied.