@@ -18,6 +18,9 @@ import qualified Data.Map as Map
1818#if !MIN_VERSION_base(4,8,0)
1919import Data.Monoid (Monoid (..))
2020#endif
21+#if !MIN_VERSION_base(4,11,0)
22+import Data.Semigroup (Semigroup(..))
23+#endif
2124import Data.Text (Text, pack, unpack)
2225import Data.Text.Encoding (decodeUtf8)
2326import Data.Text.Read (signed, decimal)
@@ -36,9 +39,13 @@ instance Applicative YamlParser where
3639instance Alternative YamlParser where
3740 empty = fail "empty"
3841 (<|>) = mplus
42+instance Semigroup (YamlParser a) where
43+ (<>) = mplus
3944instance Monoid (YamlParser a) where
4045 mempty = fail "mempty"
41− mappend = mplus
46+#if !MIN_VERSION_base(4,11,0)
47+ mappend = (<>)
48+#endif
4249instance Monad YamlParser where
4350 return = pure
4451 YamlParser f >>= g = YamlParser $ \am ->