on master help sign in
Support for GHC 8.8.1
commit485df7bb08d7ed17a0be363ff493ed27e77fda13 authorMichael Snoyman <michael@snoyman.com> dateMon 26 Aug 2019, 21:16 (7 years ago) parent4f5a038
4 files changed+13−1
yaml/ChangeLog.md+4 yaml/package.yaml+1−1 yaml/src/Data/Yaml.hs+5 yaml/src/Data/Yaml/Parser.hs+3
yaml/ChangeLog.md+4
@@ -1,5 +1,9 @@
11# ChangeLog for yaml
22
3+## 0.11.1.2
4+
5+* Compiles with GHC 8.8.1 (`MonadFail` split)
6+
37## 0.11.1.1
48
59* Use the appropriate `Scientific` rendering function to avoid a memory overflow when rendering. The previously used function from `aeson` would not use scientific notation, and could use large amounts of memory for values such as `1e9999999999999`.
yaml/package.yaml+1−1
@@ -1,5 +1,5 @@
11name: yaml
2−version: 0.11.1.1
2+version: 0.11.1.2
33synopsis: Support for parsing and rendering YAML documents.
44description: README and API documentation are available at <https://www.stackage.org/package/yaml>
55category: Data
yaml/src/Data/Yaml.hs+5
@@ -299,5 +299,10 @@ decodeFileThrow f = liftIO $ decodeFileEither f >>= either throwIO return
299299array :: [Value] -> Value
300300array = Array . V.fromList
301301
302+#if MIN_VERSION_base(4, 13, 0)
303+parseMonad :: MonadFail m => (a -> Parser b) -> a -> m b
304+#else
302305parseMonad :: Monad m => (a -> Parser b) -> a -> m b
306+#endif
303307parseMonad p = either fail return . parseEither p
308+{-# DEPRECATED parseMonad "With the MonadFail split, this function is going to be removed in the future. Please migrate to parseEither." #-}
yaml/src/Data/Yaml/Parser.hs+3
@@ -52,6 +52,9 @@ instance Monad YamlParser where
5252 case f am of
5353 Left t -> Left t
5454 Right x -> unYamlParser (g x) am
55+#if MIN_VERSION_base(4,13,0)
56+instance MonadFail YamlParser where
57+#endif
5558 fail = YamlParser . const . Left . pack
5659instance MonadPlus YamlParser where
5760 mzero = fail "mzero"