@@ -53,7 +53,7 @@ import Network.PagerDuty.Internal.TH
5353import Data.Time.Locale.Compat
5454
5555newtype CSV a = CSV [a]
56− deriving (Eq, Show, Monoid)
56+ deriving (Eq, Show, Semigroup, Monoid)
5757
5858makePrisms ''CSV
5959
@@ -70,7 +70,7 @@ instance ToByteString a => ToJSON (CSV a) where
7070 toJSON = String . Text.decodeUtf8 . toByteString'
7171
7272newtype List a = L [a]
73− deriving (Eq, Show, Monoid)
73+ deriving (Eq, Show, Semigroup, Monoid)
7474
7575deriveJSON ''List
7676makePrisms ''List
@@ -310,11 +310,13 @@ data Path where
310310 Path :: Path
311311 Seg :: ToByteString a => a -> Path
312312
313+instance Semigroup Path where
314+ x <> Path = x
315+ Path <> y = y
316+ Seg x <> Seg y = Seg (builder x <> "/" <> builder y)
317+
313318instance Monoid Path where
314− mempty = Path
315− mappend x Path = x
316− mappend Path y = y
317− mappend (Seg x) (Seg y) = Seg (builder x <> "/" <> builder y)
319+ mempty = Path
318320
319321instance IsString Path where
320322 fromString = Seg