@@ -53,7 +53,7 @@ import Network.PagerDuty.Internal.TH
53import Data.Time.Locale.Compat
53import Data.Time.Locale.Compat
55newtype CSV a = CSV [a]
55newtype CSV a = CSV [a]
56− deriving (Eq, Show, Monoid)
56+ deriving (Eq, Show, Semigroup, Monoid)
58makePrisms ''CSV
58makePrisms ''CSV
@@ -70,7 +70,7 @@ instance ToByteString a => ToJSON (CSV a) where
70 toJSON = String . Text.decodeUtf8 . toByteString'
70 toJSON = String . Text.decodeUtf8 . toByteString'
72newtype List a = L [a]
72newtype List a = L [a]
73− deriving (Eq, Show, Monoid)
73+ deriving (Eq, Show, Semigroup, Monoid)
75deriveJSON ''List
75deriveJSON ''List
76makePrisms ''List
76makePrisms ''List
@@ -310,11 +310,13 @@ data Path where
310 Path :: Path
310 Path :: Path
311 Seg :: ToByteString a => a -> Path
311 Seg :: ToByteString a => a -> Path
313+instance Semigroup Path where
316+ Seg x <> Seg y = Seg (builder x <> "/" <> builder y)
313instance Monoid Path where
318instance Monoid Path where
314− mempty = Path
319+ mempty = Path
317− mappend (Seg x) (Seg y) = Seg (builder x <> "/" <> builder y)
319instance IsString Path where
321instance IsString Path where
320 fromString = Seg
322 fromString = Seg